borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (error - SavInto.ExecuteNonQuery())Next Topic (help me in this plz..) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : Turn on Numlock Key Solved Topic
Poster Message
yopibest
Level: Protégé

Registered: 19-01-2009
Posts: 6

Ads by Lake Quincy Media
icon Turn on Numlock Key

I've created code with vb.Net 2005 which purpose is to turn on the Numlock on. I tried this code:
SendKeys.Send("{NUMLOCK}")
but my keyboard numlock did not work as i wanted. So i used:
dim WshShell as Object = CreateObject("WScript.Shell")
WshShell.SendKeys("{NUMLOCK}")
It works, but then my antivirus keep blocking it. My question is: "How to turn on/off NUMLOCK with vb.net and not by WScritp.Shell?"
If someone could give me advice, i really appreciate. Thanks in advance.

08-03-2009 at 10:18 AM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 606
icon Re: Turn on Numlock Key

You can read the state of the NumLock with DotNet using
blValue = My.Computer.Keyboard.NumLock

but you will find a useful routine if you look here http://support.microsoft.com/kb/177674



____________________________
multi-tasking - the ability to hang more than one app. at the same time.

11-03-2009 at 03:03 PM
View Profile Send Email to User Show All Posts | Quote Reply
yopibest
Level: Protégé

Registered: 19-01-2009
Posts: 6
icon Re: Turn on Numlock Key

Thank you very much....

Ads by Lake Quincy Media
13-03-2009 at 05:21 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : Turn on Numlock Key Solved Topic
Previous Topic (error - SavInto.ExecuteNonQuery())Next Topic (help me in this plz..) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder