ICON for BUTTON1.IMAGE . . .
2018-09-13-150246
All --
In DESIGN / EDIT MODE I know how to change the IMAGE shown on a BUTTON in an APP. This is shown below

I believe this can be done while the APP is running.
Specifically . . .
If I have a button called
button_capture
and I want this button to the CAPTURE IMAGE (with the CAPTURE / IRIS icon) sometimes and the RECORD MOVIE (with RECORD / RED CIRCLE icon) depending on the state of some RADIO BUTTONS. I want this button to be as similar to the CAPTURE and RECORD buttons in the CAPTURE WINDOW (below) as possible.

I can change the BUTTON TEXT as shown below.


I would like to know how to change the IMAGE in the BUTTON using CODE.
I assume it is something like
button_capture.image = AAA ( BBB, CCC, DDD)
but I do not have enough information to determine what AAA, BBB, CCC, or DDD are. I think AAA might be GETIMAGE but I am not sure.
Would someone help here please?
Thanks.
0
Best Answers
-
Hi Matt,
One of the solutions is that you can create ImageList with 2 images in your dialog, assign this image list to the buttonThe code in designer.vb:
Me.buttonLive.ImageIndex = 2Me.buttonLive.ImageList = Me.imageList1and then control ImageIndex in your macro:If AppModule.IsPreviewing ThenbuttonLive.ImageIndex=1ElsebuttonLive.ImageIndex=2End If
Yuri0 -
Answers
-
2018-09-13-160756Yuri --I was able to get the IMAGELIST CONTROL working.To do so I
- Exported the DEPENDENCIES from the APP your IPX FILE
- Imported the DEPENDENCIES into my APP in my IPP FILE
- Added IMAGELIST1 to my APP
- Created 32 x 32 BMP FILES with the ICONS I wanted
- Added the BMP FILES to the IMAGELIST CONTROL
- Added the IMAGELIST to the BUTTON
- Set the INDEX in the CODE
The result works well as shown below.Thank you for your assistance.I was hoping to use the BUTTONX.IMAGE property and reference the ICONS already in the DLL but this method opens some other doors.Thanks.-- Matt
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions