DeckardCain Posted April 11, 2007 Posted April 11, 2007 Whats up guys. I'm trying to figure out GUI's now, and I'm lost. I need to create a GUI with a picture in the center... how do I go about doing that? I though I'd figured it out but it doesn't work, not to mention I can't sort it out from the help files... If anyone could let me know, I'd appreciate it. Thanks!
BillLuvsU Posted April 11, 2007 Posted April 11, 2007 #include<guiconstants.au3> GUICreate( "My GUI", 400, 400 ) GUICtrlCreatePic( "C:/pic.bmp", 200, 200 ) ;Insert your own values here (location, width, height) GUISetState( ) $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg( ) WEnd Theres an example for you. =] [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw
PsaltyDS Posted April 11, 2007 Posted April 11, 2007 Modified version of the example in the help file for GuiCtrlCreatePic(): ;----- example 1 ---- #include <GUIConstants.au3> $Picture = FileOpenDialog("GUI Pic Demo: Select jpeg picture", "", "JPEG (*.jpg)") GUICreate("My GUI picture", 220, 250, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) ; will create a dialog box that when displayed is centered GUISetBkColor(0xE0FFFF) $n = GUICtrlCreatePic($Picture, 10, 10, 200, 200) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
DeckardCain Posted April 11, 2007 Author Posted April 11, 2007 righteous... i was literally reading that exact thing from the help file an hour ago and i had no idea what i was doing... revisiting and of course it makes sense. go me thanks guys!
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