Load Bitmap ver 12

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Load Bitmap ver 12

Post by delta1 » Wed Jun 16, 2010 5:19 am

I entered a file name into the LoadBitmap property of a button but it does not show up on the button. Also the manual makes reference to the Glyph property.. What is that?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jun 16, 2010 9:57 am

Ignore the Glyph property - it's an internal thing.

Provide a filename of a BMP in LoadBitmap to import the image. Make sure you hit Enter, or click away from the property to make it take effect.

A bug we've just been made aware of is that the filename is wrongly stored in the dialog block meaning that at run time it will try to load the file from disk again rather than use the static image data. This will be fixed in the next release.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Post by delta1 » Wed Jun 16, 2010 7:52 pm

Make sure you hit Enter,
I believe that was the problem. Thanks.
That adds 150 lines of Glygh code for 1 button (with 5 kb bmp) so I'm thinking I might stay with plain text for my buttons but I cannot get rid of the bitmap. I guess I can just re-create the button.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Jun 16, 2010 8:10 pm

That adds 150 lines of Glygh code for 1 button (with 5 kb bmp) so I'm thinking I might stay with plain text for my buttons...
Or turn on code folding (under the editor "Tools" menu item) and fold up the dialog. You'll never have to look at it again... unless you want to.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Jun 17, 2010 5:48 am

If you don't want the bitmap stored in the dialog, then load it at run time instead. Don't add it to the dialog. Instead load it at runtime like this:

SetDialogProperty>Dialog1,MSButton1,LoadBitmap,c:\bla\myimage.bmp

This way you only load the image from file at runtime. Of course you'd need to make sure the bmp file was always present in the location the script expects.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

delta1
Junior Coder
Posts: 26
Joined: Wed Dec 16, 2009 11:23 pm

Post by delta1 » Thu Jun 17, 2010 5:09 pm

Thanks to you both and yes code folding is a very nice feature.
Rob

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts