找回密码
 加入
搜索
查看: 2810|回复: 6

[网络通信] 密码输入框 ●●●●●●●这样的效果 怎么出不来呀?『已经解决』

  [复制链接]
发表于 2012-11-7 12:29:35 | 显示全部楼层 |阅读模式
本帖最后由 loveauto 于 2012-11-7 15:07 编辑
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 334, 238, 302, 127)
$Input1 = GUICtrlCreateInput("Input1", 56, 48, 121, 21)
;_GUICtrlEdit_SetPasswordChar($Input1, "$")
_GUICtrlEdit_SetPasswordChar($Input1,  "●")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
出来的效果是


怎么不是 ●●●●●●●这样的呀

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-11-7 12:43:16 | 显示全部楼层
本帖最后由 netegg 于 2012-11-7 12:47 编辑

试试看用消息控制
发表于 2012-11-7 13:41:07 | 显示全部楼层
回复 1# loveauto

●不在ASCII中,改成UNICODE编码的就可以了(就是将函数asc()改成ascw())

具体做法是:
编辑程序的include目录下的guiedit.au3,将函数 _GUICtrlEdit_SetPasswordChar()改成下面的
Func _GUICtrlEdit_SetPasswordChar($hWnd, $cDisplayChar = "0")
        If $Debug_Ed Then __UDF_ValidateClassName($hWnd, $__EDITCONSTANT_ClassName)
        If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)
        $cDisplayChar = StringLeft($cDisplayChar, 1)
        If Ascw($cDisplayChar) = 48 Then
                _SendMessage($hWnd, $EM_SETPASSWORDCHAR)
        Else
                _SendMessage($hWnd, $EM_SETPASSWORDCHAR, Ascw($cDisplayChar))
        EndIf
EndFunc   ;==>_GUICtrlEdit_SetPasswordChar
 楼主| 发表于 2012-11-7 15:06:16 | 显示全部楼层
非常感谢 annybaby,经测试可行呵呵
发表于 2012-11-7 15:19:30 | 显示全部楼层
回复 4# loveauto

不用客气,相互帮助是应该的~~
发表于 2012-11-7 16:53:52 | 显示全部楼层
回复 3# annybaby


    这个有用谢拉
发表于 2012-11-9 10:48:56 | 显示全部楼层
回复 4# loveauto


    你的主帖,标题的
已经解决
要去掉“经”字,不然论坛不会自动已解决问题区
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-11 05:33 , Processed in 0.077488 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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