473,382 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

UserName & Password

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???
Jan 21 '08 #1
13 2267
Killer42
8,435 Expert 8TB
...I do no want the user to be allowed to type in capital letters in these two fields. only small letters should be allowed.
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.
Jan 22 '08 #2
debasisdas
8,127 Expert 4TB
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.
Jan 22 '08 #3
lotus18
866 512MB
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???
Huh? Accepting only lowercase for both fields (username and password)? This is unusual ^ ^

Rey Sean
Jan 22 '08 #4
daniel aristidou
491 256MB
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....
Jan 22 '08 #5
Two options;

1. Under TextChanged for the text boxes type:
txtBox.Text = LCase(txtBox.Text)

2. Change the Property "CharacterCasing" for the TextBox to Lower
Jan 24 '08 #6
werks
220 100+
Two options;

1. Under TextChanged for the text boxes type:
txtBox.Text = LCase(txtBox.Text)

2. Change the Property "CharacterCasing" for the TextBox to Lower
I agree with Baglovely.. OR you can use an Keyascii for it


Better Than Yesterday
Jan 24 '08 #7
Killer42
8,435 Expert 8TB
I agree with Baglovely.. OR you can use an Keyascii for it
VB6 doesn't have this property.
Jan 25 '08 #8
Ali Rizwan
925 512MB
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???
If you use Lcase property under change event it will make a trouble to user.
When user clicks on Save or Ok button write this code under the click event.

Expand|Select|Wrap|Line Numbers
  1. txtuser.Text = LCase(txtuser)
  2. txtpassword.Text = LCase(txtpassword)
Regards
>> ALI <<
Jan 27 '08 #9
werks
220 100+
VB6 doesn't have this property.
Sorry but what do you mean?

Better Than Yesterday ^^
Jan 28 '08 #10
Killer42
8,435 Expert 8TB
Sorry but what do you mean?
Sorry, put my reply on the wrong post. I meant that VB6 doesn't have a CharacterCasing property on textboxes.
Jan 28 '08 #11
Ali Rizwan
925 512MB
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 <<
Jan 29 '08 #12
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 <<

hi ali,

pls try

sub txtUserName_Keypress( )

if keyascii>=65 and keyascii<=122 'ascii for A- Z
keyascii = keyascii + 32 ' 65 + 32 : 97 , 97 - 122 : a - z
end if
end sub
Jan 29 '08 #13
werks
220 100+
Sorry, put my reply on the wrong post. I meant that VB6 doesn't have a CharacterCasing property on textboxes.

hehehe..lol


Better Than Yesterday ^^
Jan 29 '08 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like...
4
by: kvicky | last post by:
I am trying to set a scheduled task for one of my ASP.net application that I developed on a monthly basis. This application requires a login authentication. I am sending the url of the login page...
0
by: gujarsachin2001 | last post by:
hello friends i m connecting to http or https url programatically through console application using follwoing methods of credentilas but if there is username & password for that url through this...
1
by: gujarsachin2001 | last post by:
hello friends i m connecting to http or https url programatically through console application using follwoing methods of credentilas but if there is username & password for that url through this...
0
by: sanbm79 | last post by:
Hi All, I am facing a problem in posting Web request with username and password credentials. I am working on migrating Java client application to .Net which will send request to Java servlet. ...
3
by: patelxxx | last post by:
Guy's, I'm using the following code and before I even enter my username and password I get the following error: 'Username or password did not match', what I'm I doing wrong? my $session =...
8
by: BJByrne | last post by:
Hi there, I want to open a database from a macro in another database and I have it working, except that we have usernames and passwords to log on, so when the macro is run is automatically asks...
3
by: rodrigo | last post by:
I am trying to retrieve a password protected page using: get = urllib.urlopen('http://password.protected.url"').read() While doing this interactively, I'm asked for the username, then the...
1
by: RAldridge | last post by:
Hi, I am a complete newb and experimenting with the VB code below. When I run this, the device on my intranet waits for username and password until it processes the resource. It there a way to pass...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.