944,172 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 13518
  • VB.NET RSS
Mar 29th, 2007
0

Detecting any key being pressed.

Expand Post »
Hey all,

Is there a way that I can detect when any key has been pressed?

Basically I have a login box and if the user has Caps Lock on and tries to enter his password a Tooltip apears, however as soon as they type again I want the tool tip to disappear. Is there away i can detect the user has hit a key??

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mstester is offline Offline
17 posts
since Aug 2006
Mar 29th, 2007
0

Re: Detecting any key being pressed.

Yes, I think so. Although because caps lock is considered an oddity you might only be able to access it from a lower level api call. So it is a lot more work.

http://www.a1vbcode.com/snippet-3541.asp

Perhaps and:-

http://blogs.msdn.com/michkap/archiv...29/562606.aspx
Last edited by iamthwee; Mar 29th, 2007 at 3:12 pm.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Mar 30th, 2007
0

Re: Detecting any key being pressed.

yes you can do it in the forms keypress event. Are you working with windows application or console applications. if its windows then u can fine Forms-> KeyPress Event or search it in msdn library
Reputation Points: 347
Solved Threads: 13
Practically a Posting Shark
arjunsasidharan is offline Offline
812 posts
since Aug 2006
Jun 14th, 2008
0

Re: Detecting any key being pressed.

If your using .NET 3.5 you won't have to worry about the Caps lock being on as a warning is shown automatically for you! (I think this will only work if you have set the UseSystemPasswordChar attribute to True, this will only take effect after your project has been published i.e: not in design/run time).
Reputation Points: 3
Solved Threads: 1
Junior Poster in Training
KillerOfDN is offline Offline
51 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Booking system
Next Thread in VB.NET Forum Timeline: Need help with SMS program





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC