Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I really wonder while logging into Lotus notes.

Where i typed 8 characters of password while logging,it appears to be more than 12 characters.

I thought, typed some extra characters. Then only i realize that the format is set like that.If I type 1 character it shows as 4 character sighs!!!,I like to implement the same in Could you please help me with this.

I do not know where to ask this question. thats why i posted in general.

for example:

if i type 'a' in password text box, it appears "XXXX", then if i type 'b' it appears "XXXXXXXX" this is how it goes on. It appends 3 more character for every characters i type. I only want to know, how it can be achieved?

I believe this gives clear idea about the thing i'm asking about.......
Updated 7-Oct-19 17:32pm
MAKReddy 16-May-12 7:54am    
u told u will type 1 char it's showing 4 but before u told u typed 8 characters its showing 12 characters
which one is correct i am confusing about ur question.
♥…ЯҠ…♥ 17-May-12 1:38am    
Kindly note that, i've mentioned more than 12 characters
Vasim889 16-May-12 8:12am    
k,i realized your problem.but where is the code .if you gave code and then i will solve your issues
Maciej Los 16-May-12 9:46am    
What 'k' mean?
♥…ЯҠ…♥ 17-May-12 1:41am    
I want to implement it, i do not have code for this. I want to know the concept behind this. That's it

You could do a text change event something like this, but then you have to remove the extra Char. before validating the password.

Private Sub PasswordTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasswordTextBox.TextChanged
    If PasswordTextBox.Text.Count <= 1 Then
    End If
End Sub

the Input text is Test the output is T***est
Share this answer
♥…ЯҠ…♥ 17-May-12 4:48am    
Out of my knowledge it just appends additional 3 characters for 1 character. If i press 1 character, it should appear as 4 character. got my question?
ledtech3 17-May-12 9:37am    
After some testing using the PasswordTextBox_KeyDown event you can append however many Character you want per Character entered up to the max limit for the control then you get a buffer overflow. But it would take allot of code to make it robust enough to handle the delete or other KeyDown events. If you remove the constraints of <=1 from the sample above then it just automatically keeps appending itself till you get a buffer overflow.
Not sure if I understood the question correctly, but many applications don't show the actual length of the password. For example, regardless of the password length the text box may show always 8 asterisks. Often this is done so that a person behind you cannot interpret the length of the password in order to get a hint of it.

Now if you like, you can track the actual key input and set something else to the text box. In this case you wouldn't actually use the text in the text box at all since it's irrelevant. The real password is in the variable where you put the keystrokes.

Whether this is practical or not, I'm not against or on behalf of it. Often users may find this confusing, but if there are reasons to implement it, why not.
Share this answer
VJ Reddy 16-May-12 19:50pm    
Good answer. 5!
Wendelius 17-May-12 3:40am    
Thanks VJ
♥…ЯҠ…♥ 17-May-12 1:44am    
I want to know the concept behind this....
for example: if i type 'a', it appears "XXXX", then if i type 'b' it appears "XXXXXXXX" this is how it goes. It appends 3 more character for every characteryou type. I only want to know how it can be?
Wendelius 17-May-12 3:39am    
If you want to use a random amount, just use Random class to get for example a number between 1 and 5. Using that number, repeat the mask character when a key is pressed
Jim Jos 17-May-12 2:47am    

Lotus notes uses a random algorithm to show the number of characters XXX for every key typed. It ll never be the same count!! This is just to prevent from people finding out how many characters you password has.
Hi Folks,

I tried the same and accomplished the same.
For each and every click it should append 3 more chars to the text box only for visual purpose.
With that

private void textBox1_KeyUp(object sender, KeyEventArgs e)
//Records each and every key stroke and stores in temp variable.
             tempPassword += e.KeyCode.ToString();
//It should append three more characters to the text box.

This is the code I've been looked for.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900