#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("test", 247, 158, 216, 188)
$Label1 = GUICtrlCreateLabel("用户名:", 16, 16, 43, 17)
$User = GUICtrlCreateInput("", 72, 16, 169, 21)
GUICtrlSetState(-1,$GUI_FOCUS)
$Label2 = GUICtrlCreateLabel("密码:", 24, 56, 31, 17)
$Password = GUICtrlCreateInput("", 72, 54, 169, 21)
$Button1 = GUICtrlCreateButton("确定", 80, 112, 89, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $User
GUICtrlSetState($Password,$GUI_FOCUS)
Case $Password
GUICtrlSetState($Button1,$GUI_FOCUS)
EndSwitch
WEnd
|