ludo10 Posted June 28, 2006 Share Posted June 28, 2006 Hello, as many others, i am new in GUI scripts. I have to script an easy thing : View a JPG and a OK button to close the GUI windows, with no title bar if possible, and no icon task Actually, i used this script. If someone could help me to finish it Bests regards #include <GUIConstants.au3> GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic("D:\temp\jpg\toto.jpg",50,50, 250,250) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend GUISetState () ; resize the control $n=GUICtrlSetPos($n,50,50,200,100) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
syberschmo Posted June 28, 2006 Share Posted June 28, 2006 Hello, as many others, i am new in GUI scripts. I have to script an easy thing : View a JPG and a OK button to close the GUI windows, with no title bar if possible, and no icon task Actually, i used this script. If someone could help me to finish it Bests regards Well, I Really have no idea what you are trying to do, but here's a stab at something that might get you started: #include <GUIConstants.au3> GUICreate("My GUI picture",350,275,-1,-1,$WS_POPUP) GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic("D:\temp\jpg\toto.jpg",0,0,250,250) $b=GuiCtrlCreateButton("Close", 150, 250, 50, 25) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $b ExitLoop EndSelect Wend Exit 1) The $WS_POPUP style is used to make a window without a title bar. 2) You will have to change the GUICtrlCreatePic function so that the parameters match your image. 3) And if the user clicks the button "Close", I have the windows close. I believe this is what you requested. I hope this helps. For further help, try consulting the helpfile. If your native language is not english, I believe there are translations of the file available. Gradient-Filled Progress Bars UDF Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted June 28, 2006 Share Posted June 28, 2006 (edited) o and by the way the hole consult the help file he copied that right out of it ehhee #include <GUIConstants.au3> $GUI = GUICreate("Pic Chooser", 622, 320, 192, 125) $choose = GUICtrlCreateButton("Choose a Pic", 176, 288, 73, 25) $quit = GUICtrlCreateButton("Exit", 344, 288, 81, 25) $pic = GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg", 144, 8, 305, 273) GUICtrlSetState(-1,$GUI_DISABLE) GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $choose GUICtrlDelete($pic) $pic = GUICtrlCreatePic(FileOpenDialog("Choose a Picture","","Jpegs (*.jpg;*.jpeg)"), 144, 8, 305, 273) GUICtrlSetState(-1,$GUI_DISABLE) Case $msg = $quit or $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Edited June 28, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
ludo10 Posted June 28, 2006 Author Share Posted June 28, 2006 thx syberschmo. It is possible to hide the task in the task bar of windows? Link to comment Share on other sites More sharing options...
Valuater Posted June 28, 2006 Share Posted June 28, 2006 thx syberschmo.It is possible to hide the task in the task bar of windows?yes... but maybe you should look intoSplashImageOn() ... in the help filesounds more like what you want8) 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