| | |
Detecting any key being pressed.
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2006
Posts: 17
Reputation:
Solved Threads: 0
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
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
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
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.
*Voted best profile in the world*
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
There is just two ways to live your life.
One is as though nothing is a miracle.
The other is as if everything is.
One is as though nothing is a miracle.
The other is as if everything is.
•
•
Join Date: Apr 2008
Posts: 50
Reputation:
Solved Threads: 1
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).
![]() |
Similar Threads
- Odd Page Cannot Be Displayed Problem (All browsers, not just IE) (Windows NT / 2000 / XP)
- video & sound freezing up (Windows NT / 2000 / XP)
- How to remove Linux and install Windows XP? (IT Professionals' Lounge)
- Keypress Detection (C)
- c doubts (C++)
- reading key combinations (C++)
- Help windows keep opening automatically in any application - is this a virus? (Windows NT / 2000 / XP)
- Func like getlastkey() or something like that? (C)
Other Threads in the VB.NET Forum
- Previous Thread: Booking system
- Next Thread: How to create Next,Previous button codings?
| Thread Tools | Search this Thread |
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function generatetags html images input intel internet listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol vb vb.net vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms winsock wpf wrapingcode xml year






