But if i want check the caps and num lock in a windows form application?
But if i want check the caps and num lock in a windows form application?
So if thats the code.. it is possible to change the value?
is this value a copy of the value or does it really change if caps lock is on?Code:Console.CapsLock = false;
hi thanks for sharing.
For those who want to use this in a windows form, Here's an example of how:
Basically, Control.IsKeyLocked(Keys.Capslock) return a true or false.Code:MessageBox.Show(Control.IsKeyLocked(Keys.CapsLock).ToString());
Correct syntax is such:
keyVal being the key you want checkedCode:public static bool IsKeyLocked( Keys keyVal )
The way I used it:
Code:Control.IsKeyLocked(Keys.<key>);
Programmer (n): An organism that can turn caffeine into code.
Programming would be so much easier without all the users.
all are the same,but there are some coding strategies to use to minimize runtime,so i vote for both as they contain the qualities i consider
You laugh at me because I'am different
I laugh at you because you all are the same
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum