How to insert picture in dialog box

11 posts / 0 new
Last post
William Yong
Offline
Joined: 06/30/2014 - 00:37
How to insert picture in dialog box

Hi,
I'm trying to insert a picture into my dialog box. However, my picture did not appear. I use DlgSetPicture "Picture1", "C:\Users\Desktop\Butterfly.bmp". Any sample script that could assist me here.
Thank you in advance. William

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi William,

Make sure that the bitmap exists in that location.  Another problem I have seen is sometimes even though it has a bmp it isn't a bitmap that IDEA will be able to understand, you have to remember that the editor is pretty old.  So you might want to open the image and resave it to see if that works.

Brian

William Yong
Offline
Joined: 06/30/2014 - 00:37

Thanks Brian for the advice.
Another thing is could I actually click on the picture instead of clicking on my pushbutton, in short, click on the picture and start my scripting rather than click on the pushbutton. How am I able to do that?
Cheers, William. 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi William,

No unfortunately there is no way I know of using a picture as a button, it is just a picture.  I usually avoid them because of problems with having the right link, etc.  Nice to have but IDEA didn't take their functions far enough for them to be generally useful.

Brian

William Yong
Offline
Joined: 06/30/2014 - 00:37

Thanks Brian.

William Yong
Offline
Joined: 06/30/2014 - 00:37

Hi there,
I still could not successfully insert a picture inside my dialog box and I'm pretty sure that the bitmap image is exist in the location that I save from. Any chance that someone could assist me here or attach a sample script that I could work on it.
Thank you in advance.
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi William,

I have attached a zip file with three different examples, the first is where the bmp is in the project folder, the second is where the bmp is in another folder and the thrid is when the bmp is under the project folder.  If it is still not working it might be your bmp is not in a format IDEA can read, I have seen that. 

Thanks

Brian

William Yong
Offline
Joined: 06/30/2014 - 00:37

Thanks Brian. I'm able to display the picture now.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

I am glad to hear tha William, can you share how you did it so if anyone else has the problem they can learn from you.

Thanks

Brian

William Yong
Offline
Joined: 06/30/2014 - 00:37

Sure Brian.
I have attached the sample script to insert a picture. A word of reminder here is to remember to change the bitmap file path properties under 'Misc'. My path is C:\Users\Desktop\IDEA\bmp\user.bmp, so please change to the path where the .bmp file is located.
Rgds, William
 
 
 

jvelasquez@llya...
Offline
Joined: 02/06/2019 - 09:08

Hola, intenté con todos los scripts que subieron y no me salió. William, no entendí a qué te referís con 'Misc'. Agradezco su ayuda.