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???
UserName & Password
Collapse
X
-
Originally posted by mclueless...I do no want the user to be allowed to type in capital letters in these two fields. only small letters should be allowed.
If you don't like what you see, either prevent it going through, or convert it to lowercase. -
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,lowe rcase etc) and at the time of userlogin compare the same.Comment
-
Originally posted by mcluelessI 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 SeanComment
-
If you make the username and pasword non case specific....... .then why bother trying to restrict case since it will be ignored anyway.
This is assuming your checking the username and password using code that ignores casing....Comment
-
Originally posted by BaglovelyTwo options;
1. Under TextChanged for the text boxes type:
txtBox.Text = LCase(txtBox.Te xt)
2. Change the Property "CharacterCasin g" for the TextBox to Lower
Better Than YesterdayComment
-
Originally posted by mcluelessI 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???
When user clicks on Save or Ok button write this code under the click event.
[CODE=vb]txtuser.Text = LCase(txtuser)
txtpassword.Tex t = LCase(txtpasswo rd)[/CODE]
Regards
>> ALI <<Comment
-
Sorry for some errors in my code use UCase instead of LCase
UCase() = Convert alphabets to Upper Case
LCase() = Convert alphabets to Lower Case
Regards
>> ALI <<Comment
-
Originally posted by Ali RizwanSorry for some errors in my code use UCase instead of LCase
UCase() = Convert alphabets to Upper Case
LCase() = Convert alphabets to Lower Case
Regards
>> ALI <<
hi ali,
pls try
sub txtUserName_Key press( )
if keyascii>=65 and keyascii<=122 'ascii for A- Z
keyascii = keyascii + 32 ' 65 + 32 : 97 , 97 - 122 : a - z
end if
end subComment
Comment