问题描述
我正在使用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???
推荐答案
在文本框的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.
嗯?两个字段(用户名和密码)仅接受小写?这很不寻常^ ^
Rey Sean
Huh? Accepting only lowercase for both fields (username and password)? This is unusual ^ ^
Rey Sean
这篇关于用户名&密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!