本帖最后由 魔导 于 2012-5-2 12:58 编辑
;~ 编写一个程序,它显示您的姓名和地址
$Form1 = GUICreate("练习",200,150,-1,-1)
GUICtrlCreateLabel("姓名",5,2)
GUICtrlCreateLabel('地址',5,20)
$input = GUICtrlCreateInput("",50,2,80,15)
$input1 = GUICtrlCreateInput("",50,20,80,15)
$button = GUICtrlCreateButton("确定",60,40,30,20)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $button
$xingming = '姓名:'
$xingming &= GUICtrlRead($input)
$dizhi = '地址:'
$dizhi &= GUICtrlRead($input1)
MsgBox(0,0,$xingming&@crlf&$dizhi)
EndSwitch
wend
|