【已解决】为什么自己写的界面,用鼠标点击输入框不起作用?
本帖最后由 silvay22 于 2013-5-23 15:15 编辑代码如下:
#Include <GuiEdit.au3>
#include <WindowsConstants.au3>
sr()
Func sr()
Global $Form = GUICreate("", 283, 220, 318, 141, $WS_MINIMIZEBOX)
Local $Label = GUICtrlCreateLabel("姓名:", 8, 16, 256, 40)
$Input= GUICtrlCreateInput("", 88, 16, 167, 21)
Local $Label2 = GUICtrlCreateLabel("单位:", 8, 80, 256, 40)
$Input2 = GUICtrlCreateInput("", 88, 80, 167, 21)
$Button= GUICtrlCreateButton("确定", 88, 130, 81, 25, 0)
GUISetState(@SW_SHOW)
While 1
Sleep(1)
$nMsg = GUIGetMsg()
Select
Case $nMsg = $Button
$hm = GUICtrlRead($Input)
$name = GUICtrlRead($Input2)
If $hm = "" Or $name = "" Then
MsgBox(0, "错误!", "请将信息填写完整")
Else
GUIDelete($Form)
ExitLoop
EndIf
EndSelect
WEnd
EndFunc ;==>nsrsbhsr
不知道为什么无法点击输入框,请大家帮帮忙 单位、姓名的Label控件矩形范围过大 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 A版辛苦了。不光给出了原因,还给出了代码。而且每次都是第一时间。好感动。总是那么无私。 回复 4# silvay22
呵呵,可惜力所能及的范围过于狭窄~ A版太谦虚了。再一次谢谢。
页:
[1]