Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is it possible to type hidden password in form without textbox? i mean like typing the cheat in GTA?

i want to set a password in my mainform to open another form.
Posted
v3
Comments
CHill60 30-May-13 4:23am    
Is this winforms or webpage or other and what program language?
Justin Jendrick Nocillado 30-May-13 4:25am    
winforms - VB .net - VS2010

1 solution

If you have KeyPreview=True on your form then you can capture any keystrokes on the form before they get passed onto any controls on the form. You can analyse them in any of the Key*** events on the form e.g.
VB
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
    pword += e.KeyCode.ToString()
End Sub
 
Share this answer
 
Comments
Akinmade Bond 30-May-13 8:17am    
Good one. All he needs to do now is set a timeout to reset the password again.
CHill60 30-May-13 10:43am    
Good point!! Feel free to use Improve solution to make sure OP sees that

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