#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 440, 240, -1, -1)
$Button1 = GUICtrlCreateButton("确定", 336, 16, 97, 33)
$Button2 = GUICtrlCreateButton("退出", 336, 64, 97, 33)
$Edit1 = GUICtrlCreateEdit("", 8, 8, 313, 193)
GUICtrlSetData(-1, "文本框")
$Group1 = GUICtrlCreateGroup("", 0, 208, 440, 10)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("", 8, 218, 430, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$mouseinfo=GUIGetCursorInfo()
Switch $mouseinfo[4]
Case $Button1
If GUICtrlRead($Label1)<>"鼠标在<确定>上" Then GUICtrlSetData($Label1,"鼠标在<确定>上")
Case $Button2
If GUICtrlRead($Label1)<>"鼠标在<退出>上" Then GUICtrlSetData($Label1,"鼠标在<退出>上")
Case $Edit1
If GUICtrlRead($Label1)<>"鼠标在<文本框>上" Then GUICtrlSetData($Label1,"鼠标在<文本框>上")
Case Else
GUICtrlSetData($Label1,"")
EndSwitch
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE,$Button2
Exit
EndSwitch
WEnd
|