- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- Opt("GUIOnEventMode", 1)
- #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\桌面\Form1.kxf
- $Form1 = GUICreate("Form1", 143, 95, 318, 146)
- GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
- $Button1 = GUICtrlCreateButton("弹起", 32, 24, 65, 49)
- GUICtrlSetOnEvent($Button1, "Button1Click")
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- Dim $start = False
- While 1
- Sleep(100)
- WEnd
- Func Button1Click()
- If $start = False Then
- GUICtrlSetStyle($Button1,-1,$WS_EX_CLIENTEDGE)
- GUICtrlSetData($Button1,"按下")
- $start = True
- Else
- GUICtrlSetStyle($Button1,-1,$WS_EX_WINDOWEDGE)
- GUICtrlSetData($Button1,"弹起")
- $start = False
- EndIf
- EndFunc
- Func Form1Close()
- Exit
- EndFunc
复制代码 |