sr()
Func sr()
Global $Form = GUICreate("", 283, 220, 318, 141, 0x20000) ;$WS_MINIMIZEBOX = 0x20000
Local $Label = GUICtrlCreateLabel("姓名:", 8, 16, 50, 20)
$Input = GUICtrlCreateInput("", 88, 16, 167, 21)
Local $Label2 = GUICtrlCreateLabel("单位:", 8, 80, 50, 20)
$Input2 = GUICtrlCreateInput("", 88, 80, 167, 21)
$Button = GUICtrlCreateButton("确定", 88, 130, 81, 25, 0)
$Button1 = GUICtrlCreateButton("退出", 170, 130, 81, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button
$hm = GUICtrlRead($Input)
$name = GUICtrlRead($Input2)
If $hm = "" Or $name = "" Then
MsgBox(0, "错误!", "请将信息填写完整")
Else
GUIDelete($Form)
ExitLoop
EndIf
Case $Button1
Exit
EndSwitch
WEnd
EndFunc ;==>sr
|