nht3004 Posted May 5, 2009 Posted May 5, 2009 I have a form, and then when I delete it ( because I can't exit program ), the buttons of the other form of my program became unclickable, they won't response the mouse! Example: $confirmForm=GUICreate("Confirm", 314, 136); $yes=GUICtrlCreateButton("Yes", 8, 104, 55, 25); GUISetState(@SW_SHOW); While 1 $msgConfirmForm=GUIGetMsg(); Switch $msgConfirmForm; Case $GUI_EVENT_CLOSE; Exit Case $yes; $deleteForm=GUICreate("Trial Form", 314, 136); $delete=GUICtrlCreateButton("Delete Form", 8, 104, 55, 25); GUISetState(@SW_SHOW); While 1 $msgDeleteForm=GUIGetMsg(); Switch $msgDeleteForm; Case $GUI_EVENT_CLOSE; Exit; Case $delete; GUIDelete($deleteForm); EndSwitch WEnd EndSwitch WEnd When I click delete button, the $deleteForm is deleted but the button on the confirmForm is no longer clickable! Help me to fix that, or is it a bug? for(loop=0; loop<infinity; loop++) { alert('I love you'); }
mexykanu Posted May 5, 2009 Posted May 5, 2009 (edited) i think this is it. you forgot to add a ExitLoop after GUIDelete($deleteForm); #include <GUIConstantsEx.au3> $confirmForm=GUICreate("Confirm", 314, 136); $yes=GUICtrlCreateButton("Yes", 8, 104, 55, 25); GUISetState(@SW_SHOW); While 1 $msgConfirmForm=GUIGetMsg(); Switch $msgConfirmForm; Case $GUI_EVENT_CLOSE; Exit Case $yes; $deleteForm=GUICreate("Trial Form", 314, 136); $delete=GUICtrlCreateButton("Delete Form", 8, 104, 55, 25); GUISetState(@SW_SHOW); While 1 $msgDeleteForm=GUIGetMsg(); Switch $msgDeleteForm; Case $GUI_EVENT_CLOSE; Exit; Case $delete; GUIDelete($deleteForm); ExitLoop EndSwitch WEnd EndSwitch WEnd Edited May 5, 2009 by mexykanu
nht3004 Posted May 5, 2009 Author Posted May 5, 2009 i think this is it. you forgot to add a ExitLoop after GUIDelete($deleteForm); #include <GUIConstantsEx.au3> $confirmForm=GUICreate("Confirm", 314, 136); $yes=GUICtrlCreateButton("Yes", 8, 104, 55, 25); GUISetState(@SW_SHOW); While 1 $msgConfirmForm=GUIGetMsg(); Switch $msgConfirmForm; Case $GUI_EVENT_CLOSE; Exit Case $yes; $deleteForm=GUICreate("Trial Form", 314, 136); $delete=GUICtrlCreateButton("Delete Form", 8, 104, 55, 25); GUISetState(@SW_SHOW); While 1 $msgDeleteForm=GUIGetMsg(); Switch $msgDeleteForm; Case $GUI_EVENT_CLOSE; Exit; Case $delete; GUIDelete($deleteForm); ExitLoop EndSwitch WEnd EndSwitch WEndThanks alot, it works ^^! for(loop=0; loop<infinity; loop++) { alert('I love you'); }
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