MvGulik Posted January 27, 2010 Share Posted January 27, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
anixon Posted January 27, 2010 Share Posted January 27, 2010 (edited) I've encountered something I don't really understand my self. i have a function to create a new gui Func edit() $winopen= GUICreate("Redigera text", 145, 173, -1, -1, BitOR ($WS_POPUP, $WS_BORDER), -1) GUISetState(@sw_show, $winopen) $myedit = GUICtrlCreateEdit("Text", 5, 5, 135, 135) $save = GUICtrlCreateButton("Spara", 5, 145) $abort = GUICtrlCreateButton("Avbryt", 50, 145) ;//put the $sExit = GUICtrlCreateButton("Exit", nn, nn) here While 1 $msg2 = GUIGetMsg() If $msg2 = $GUI_EVENT_CLOSE Or $msg2 = $abort Then GUIdelete($winopen) ;GUISwitch ($main) $msg2 = 0 ExitLoop EndIf wend EndFunc before I added the while 1 loop the gui where written as it should but now it stops right after it has created the gui window. the controls in the window are never written! Have a look at this code Func _Edit() While 1 $GUICreate("Redigera text", 145, 173, -1, -1, BitOR ($WS_POPUP, $WS_BORDER), -1) GUISetState() $myedit = GUICtrlCreateEdit("Text", 5, 5, 135, 135) $save = GUICtrlCreateButton("Spara", 5, 145) $abort = GUICtrlCreateButton("Avbryt", 50, 145) While 1 $msg2 = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $sExit GUIDelete() ExitLoop (2) Case $msg = $save GUIDelete() ;//Your Code for Save ExitLoop Case $msg = $myEdit GUIDelete() ;//Your Code for Edit ExitLoop EndSelect WEnd WEnd EndFunc Edited January 27, 2010 by anixon Link to comment Share on other sites More sharing options...
PhilipG Posted January 27, 2010 Author Share Posted January 27, 2010 Thanks for all the help. The sleep delay did the trick! Thanks! 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