Guten Morgen
Ich habe ein GUI erstellt, welches lediglich ein Label ausgeben soll, welches Deaktiviert bzw Aktiviert anzeigen soll.
Man drückt einen Knopf und er soll zwischen den beiden wechseln.
Das GUI bleibt soweit stehen, nur wird mir im Label kein Text ausgeworfen, normalerweise müsste dort doch zumindest "0" stehen?
Liebe grüße
Raydok
C
#include <GuiConstants.au3>
#include <GUIConstantsEx.au3>
#include <misc.au3>
Global $abfrage = 0
Global $Status = 0
Global $Status2 = 1
Fenster()
Func Fenster()
; Create a GUI with various controls.
Local $hGUI = GUICreate("Test", 150, 200)
Local $idOK = GUICtrlCreateLabel("", 50, 75, 85, 25)
Local $aWindow_Size = WinGetPos($hGUI)
ConsoleWrite('Window Width = ' & $aWindow_Size[2] & @CRLF)
ConsoleWrite('Window Height = ' & $aWindow_Size[3] & @CRLF)
Local $aWindowClientArea_Size = WinGetClientSize($hGUI)
ConsoleWrite('Window Client Area Width = ' & $aWindowClientArea_Size[0] & @CRLF)
ConsoleWrite('Window Client Area Height = ' & $aWindowClientArea_Size[1] & @CRLF)
; Display the GUI.
GUISetState(@SW_SHOW, $hGUI)
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $abfrage
if $abfrage < 0 Then
GUICtrlSetData($idOK, "Deaktiviert")
GUISetState(@SW_SHOW, $hGUI)
elseif $abfrage > 1 Then
GUICtrlSetData($idOK, "Aktiviert")
GUISetState(@SW_SHOW, $hGUI)
EndIf
EndSwitch
WEnd
; Delete the previous GUI and all controls.
GUIDelete($hGUI)
EndFunc ;==>Example[tt][/tt]
Alles anzeigen