用户名&密码 [英] UserName & Password

查看:91
本文介绍了用户名&密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB6。在这里,我有一个包含用户名和密码字段的表单。我不希望允许用户在这两个字段中输入大写字母。只允许使用小写字母。怎么办呢???

I am working with VB6. Here, i have a form with User name and password fields. I do no want the user to be allowed to type in capital letters in these two fields. only small letters should be allowed. how can this be done???

推荐答案


...我不希望用户被允许在这两个字段中输入大写字母。只允许使用小写字母。
...I do no want the user to be allowed to type in capital letters in these two fields. only small letters should be allowed.



在文本框的KeyDown或KeyPress事件中(我假设它们是文本框)只需检查收到的值。


如果你不喜欢你所看到的,要么阻止它通过,要么将它转换为小写。

In the KeyDown or KeyPress event for the textbox (I''m assuming they''re textboxes) just check what value was received.

If you don''t like what you see, either prevent it going through, or convert it to lowercase.


但是不建议限制用户名和仅限某些案例的密码。所以你可以做的是从userinput接收值并以所需的格式(大写,小写等)存储,并在userlogin比较时。
But it is not recommended to restrict the username and password to certain case only. So what you can do is receive the value from userinput and store in a desired format (uppercase,lowercase etc) and at the time of userlogin compare the same.



我正在使用VB6。在这里,我有一个包含用户名和密码字段的表单。我不希望允许用户在这两个字段中输入大写字母。只允许使用小写字母。如何才能做到这一点???
I am working with VB6. Here, i have a form with User name and password fields. I do no want the user to be allowed to type in capital letters in these two fields. only small letters should be allowed. how can this be done???



嗯?两个字段(用户名和密码)仅接受小写?这很不寻常^ ^


Rey Sean

Huh? Accepting only lowercase for both fields (username and password)? This is unusual ^ ^

Rey Sean


这篇关于用户名&密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆