May 17, 2002 #1 BaDi Programmer May 14, 2002 32 NL Hi! I Have a command button. On the ON_CLICK event I want to change the picture of the button. How does this work? Thanx in advance!
Hi! I Have a command button. On the ON_CLICK event I want to change the picture of the button. How does this work? Thanx in advance!
May 17, 2002 #2 miq Programmer Apr 24, 2002 315 PK hi, first set style property to Graphical (1) and then use <button name>.Picture = <picture path and name> for eg. if button name is command1 and picture is in root directory then command1.Picture = "c:\abc.ico" Bye Upvote 0 Downvote
hi, first set style property to Graphical (1) and then use <button name>.Picture = <picture path and name> for eg. if button name is command1 and picture is in root directory then command1.Picture = "c:\abc.ico" Bye
May 17, 2002 Thread starter #3 BaDi Programmer May 14, 2002 32 NL I had tried this allready. An error "Type-missmatch" occurs. I hope that it is possible at all!!.. I don't get it! Thanx anyway! But any further help is more then welcome! Upvote 0 Downvote
I had tried this allready. An error "Type-missmatch" occurs. I hope that it is possible at all!!.. I don't get it! Thanx anyway! But any further help is more then welcome!
May 17, 2002 #4 TheVampire Programmer May 1, 2002 828 US What extension does the picture file have that you are using? .bmp, .ico ? Robert Upvote 0 Downvote
May 17, 2002 1 #5 strongm MIS May 24, 2001 20,237 GB Actually, what you need is: Command1.Picture = LoadPicture(<your_image_file>) Upvote 0 Downvote
May 18, 2002 #6 miq Programmer Apr 24, 2002 315 PK yes strongm is right. I was probably feeling sleepy when i wrote command1.Picture = "c:\abc.ico" I must have wrote command1.picture = loadpicute ("c:\abc.ico" Anyway, I will be more carefull for future posts Upvote 0 Downvote
yes strongm is right. I was probably feeling sleepy when i wrote command1.Picture = "c:\abc.ico" I must have wrote command1.picture = loadpicute ("c:\abc.ico" Anyway, I will be more carefull for future posts