by Tom Pydeski (16 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
Another Method of putting a picture in a command button with style set to normal (to preserve XP skin-ability). This is in response to a posting by AbĂlio Rodrigues "A Command Button with Icon (XP)" at https://www.vbcoders.com/vb/scripts/showcode.asp?txtCodeId=57116&lngWId=1. I tried to post it as a comment on his posting, but received an email saying it did not work. So, it's easier to just upload it as a zip. This works for XP, but might work in other OS's.
Inputs
separate command button and picture with an icon to put in the button.
Assumes
I use vb 6.0 with WinXP SP2.
Code Returns
an XP command button with a picture.
Side Effects
may lose the picture sometimes, but i'm not sure...
API Declarationsuses the setparent api