本帖最后由 502762378 于 2012-1-14 13:20 编辑 $Form1 = GUICreate("Form1", 246, 135, 192, 124)
HotKeySet("!h", "ShowMessage")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
If GUIGetMsg()= -3 Then Exit
WEnd
Func ShowMessage()
Local $aResult = DllCall("user32.dll", "bool", "IsWindowVisible", "hwnd", $Form1)
If $aResult[0] = 0 then
DllCall("user32.dll", "bool", "ShowWindow", "hwnd", $Form1, "int", @SW_SHOW)
Else
DllCall("user32.dll", "bool", "ShowWindow", "hwnd", $Form1, "int", @SW_HIDE)
EndIf
EndFunc
|