Ich wollte mir grad ein kleines Tool bauen doch anstatt das angegebene Fenster zu Hiden, Hided es sich selber.
Wo liegt mein Problem?
PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Window Hider", 300, 179, 193, 125)
$Button1 = GUICtrlCreateButton("Hide", 32, 16, 217, 33, 0)
$Button2 = GUICtrlCreateButton("Show", 32, 56, 217, 33, 0)
$Input1 = GUICtrlCreateInput("Window Name", 40, 96, 209, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$read1 = GuiCtrlRead ($Input1)
$hWnd = WinGetHandle ($read1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
_Show()
Case $Button1
_Hide()
EndSwitch
WEnd
Func _Show()
WinSetState($hWnd, "", @SW_SHOW)
EndFunc
Func _Hide()
WinSetState($hWnd, "", @SW_HIDE)
EndFunc