If you run this script and click on the window, it hangs. This is as it should be! But if you remove the comment, everything will be OK!
Any ideas.
Thanks.
Global Const $WM_ACTIVATE = 0x0006 Global Const $WM_LBUTTONDOWN = 0x0201 ;GUIRegisterMsg($WM_ACTIVATE, 'WM_ACTIVATE') GUIRegisterMsg($WM_LBUTTONDOWN, 'WM_LBUTTONDOWN') _MyGUI() Func WM_ACTIVATE($hWnd, $iMsg, $wParam, $lParam) Return 'GUI_RUNDEFMSG' EndFunc ;==>WM_ACTIVATE Func WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) _MyGUI() Return 'GUI_RUNDEFMSG' EndFunc ;==>WM_LBUTTONDOWN Func _MyGUI() Local $hForm, $Msg, $Button $hForm = GUICreate('MyGUI', 400, 400) $Button = GUICtrlCreateButton('Exit', 165, 360, 70, 23) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3, $Button ExitLoop EndSwitch WEnd GUIDelete($hForm) EndFunc ;==>_MyGUI
Edited by Yashied, 28 June 2009 - 11:00 PM.








