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