SWINX Posted March 13, 2005 Posted March 13, 2005 This works: GUICtrlCreateButton ("my picture button", 10,20,40,40, $BS_ICON) GUICtrlSetImage (-1, "shell32.dll",22) But when I try to show a JPG, it doesn't work out. I also tried this: $imgInstallFiles = GUICtrlCreatePic("..\_shared\true.jpg", 10, 53, 15, 15) But also that didn't show my picture Also tried to specify the full path to the image, but nothing seems to work Somebody who knows why, and how to fix it?
quaizywabbit Posted March 13, 2005 Posted March 13, 2005 (edited) i think bitmaps and icons are the only image types allowed for buttons from the helpfile: " In both case the $BS_ICON or $BS_BITMAP styles are needed to select the type of the picture used." You can use GUICtrlCreatePic and assign events to it, but it won't appear to push and release like a button does... Edited March 13, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8
zcoacoaz Posted March 14, 2005 Posted March 14, 2005 i accomplished it before just make it so when the image is clicked it changes pictures [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]
SWINX Posted March 14, 2005 Author Posted March 14, 2005 (edited) I didn't see there where different types to set. I will convert my JPG to BMP and use the $BS_BITMAP style. Thanks for your replies Edited March 14, 2005 by SWINX
SWINX Posted March 14, 2005 Author Posted March 14, 2005 It still didn't work, but the problem seemd to be you have to specify a FULL path, it works fine now.
Kerberuz Posted March 16, 2005 Posted March 16, 2005 (edited) It still didn't work, but the problem seemd to be you have to specify a FULL path, it works fine now.<{POST_SNAPBACK}>Try using macros in your code. It will make your code more portable and easier to work with.Example:$Funnybtn = GUICtrlCreatePic(@WorkingDir & "\msgbox.jpg",0,0,0,0)Aye, What Slim said... Edited March 16, 2005 by Kerberuz Kerby
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now