找回密码
 加入
搜索
楼主: superflq

这样的GUICtrlCreateInput怎么创建[困难]

 火.. [复制链接]
发表于 2009-8-18 21:57:08 | 显示全部楼层
阅读权限不够,哭...
发表于 2009-8-19 16:18:17 | 显示全部楼层
学习。。。。有用
发表于 2009-8-24 00:45:42 | 显示全部楼层
很有用处,下载下来看看哈
发表于 2009-9-18 23:18:22 | 显示全部楼层
看看我行不行能不能下载
发表于 2009-9-19 14:21:51 | 显示全部楼层
权限不够。失败、
发表于 2009-9-20 08:21:08 | 显示全部楼层
不是看不懂这些,再逛逛
发表于 2009-9-23 00:41:10 | 显示全部楼层
试试这个看,应该符合LZ的要求了
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)
Local $input, $btn, $msg, $dat, $len, $ctrlhandle

GUICreate("input", 130, 80)
$input = GUICtrlCreateInput("", 10, 5, 110, 20)
GUICtrlSetLimit(-1, 17)
$btn = GUICtrlCreateButton("Ok", 35, 45, 60, 20)
GUISetState()
While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
        Switch $msg
                Case $btn
                        MsgBox(4096, "", GUICtrlRead($input))
        EndSwitch
        reinput($input)
WEnd

Func reinput($ctrlhandle)
        $dat = GUICtrlRead($ctrlhandle)
        $len = StringLen($dat)
        If $len = 2 Or $len = 5 Or $len = 8 Or $len = 11 Or $len = 14 Then
                GUICtrlSetData($ctrlhandle, $dat & "-")
        EndIf
EndFunc   ;==>reinput
 楼主| 发表于 2009-9-25 13:37:39 | 显示全部楼层
试试这个看,应该符合LZ的要求了#include

Opt('MustDeclareVars', 1)
Local $input, $btn, $msg, $dat, $len, $ctrlhandle

GUICreate("input", 130, 80)
$input = GUICtrlCreateInput("", 10, 5, 110, 20)
...
298311657 发表于 2009-9-23 00:41


这个解决方法到时很简单,
发表于 2009-9-26 10:35:28 | 显示全部楼层
阅读权限什么时候可以到
发表于 2009-9-29 17:14:33 | 显示全部楼层
真的是不错!
发表于 2009-10-24 02:10:33 | 显示全部楼层
慢慢研究
发表于 2010-11-25 10:55:13 | 显示全部楼层
学习了,37楼的方法很好
发表于 2011-1-24 14:42:00 | 显示全部楼层
我现在想做的是 input默认值是一个path的,不知道如何实现
发表于 2011-3-15 05:14:21 | 显示全部楼层
回复 1# superflq


    好东西啊 ~~~留个脚印
发表于 2011-3-15 05:14:57 | 显示全部楼层
回复 44# 子非鱼


        好东西啊 ~~~留个脚印
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-28 09:24 , Processed in 0.155139 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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