找回密码
 加入
搜索
查看: 4725|回复: 5

[GUI管理] 【已解决】为什么自己写的界面,用鼠标点击输入框不起作用?

[复制链接]
发表于 2013-5-23 10:49:40 | 显示全部楼层 |阅读模式
本帖最后由 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
不知道为什么无法点击输入框,请大家帮帮忙
发表于 2013-5-23 11:18:31 | 显示全部楼层
单位、姓名的Label控件矩形范围过大
发表于 2013-5-23 11:22:17 | 显示全部楼层
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
 楼主| 发表于 2013-5-23 12:50:15 | 显示全部楼层
A版辛苦了。不光给出了原因,还给出了代码。而且每次都是第一时间。好感动。总是那么无私。
发表于 2013-5-23 13:08:26 | 显示全部楼层
回复 4# silvay22


    呵呵,可惜力所能及的范围过于狭窄~
 楼主| 发表于 2013-5-23 15:15:14 | 显示全部楼层
A版太谦虚了。再一次谢谢。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-3 01:31 , Processed in 0.081041 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表