Nakuribon Posted December 18, 2004 Share Posted December 18, 2004 hey guys, i make a GUICtrlCreatePic("", 10, 10, 0, 0) set to $pic1 in the beginning of the script, and then I have a button that opens an open file dialog, and I set that to $addimgfile and then use GUICtrlSetImage($pic1, $addimgfile) but the image does not change... anyone know why? thanx! ~naku i own this sig... php rulezlinks:My PSP Web Portal Link to comment Share on other sites More sharing options...
Developers Jos Posted December 18, 2004 Developers Share Posted December 18, 2004 (edited) hey guys, i make a GUICtrlCreatePic("", 10, 10, 0, 0) set to $pic1 in the beginning of the script, and then I have a button that opens an open file dialog, and I set that to $addimgfile and then use GUICtrlSetImage($pic1, $addimgfile) but the image does not change... anyone know why? thanx!~naku<{POST_SNAPBACK}>maybe you can show the portion of the script that doesn't work or shows your issue ? Edited December 18, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nakuribon Posted December 18, 2004 Author Share Posted December 18, 2004 (edited) #include <GUIConstants.au3> [...] $pic = GUICtrlCreatePic("", 10, 10, 0, 0) GUISetState(@SW_SHOW) While 1 [...] Case $msg[1] = $maindialog and $msg[0] = $addimgbtn $imgfile = FileOpenDialog("Choose a picture", "", "Images (*.jpg;*.bmp;*.png;*.gif)", 1) GUICtrlSetImage($pic, $imgfile) [...] WEnd Edited December 18, 2004 by Nakuribon i own this sig... php rulezlinks:My PSP Web Portal Link to comment Share on other sites More sharing options...
Developers Jos Posted December 18, 2004 Developers Share Posted December 18, 2004 #include <GUIConstants.au3> [...] $pic = GUICtrlCreatePic("", 10, 10, 0, 0) GUISetState(@SW_SHOW) While 1 [...] Case $msg[1] = $maindialog and $msg[0] = $addimgbtn $imgfile = FileOpenDialog("Choose a picture", "", "Images (*.jpg;*.bmp;*.png;*.gif)", 1) GUICtrlSetImage($pic, $imgfile) [...] WEnd<{POST_SNAPBACK}>GUICtrlCreatePic("", 10, 10, 0, 0)Returns a -1 so looks like it cannot handle a "" as filename.Set it to a valid filename and try it again. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
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