473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

status of the key

How to get the status of any key (e.g. Caps, Insert etc). I need to display
below on the form if insert/caps is enabled.

Thanks.
Nov 17 '05 #1
2 1718
Pohihihi,

You can call the GetKeyState function through the P/Invoke layer. This
will allow you to pass a virtual key to the function, and it will return an
integer where the high order bit is set to one if it is down.

For toggle keys, like caps lock, and insert, then the low order bit will
be set to one, otherwise, it will be set to 0.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Pohihihi" <po******@hotmail.com> wrote in message
news:Ow**************@TK2MSFTNGP12.phx.gbl...
How to get the status of any key (e.g. Caps, Insert etc). I need to
display below on the form if insert/caps is enabled.

Thanks.

Nov 17 '05 #2
Thanks.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP12.phx.gbl...
Pohihihi,

You can call the GetKeyState function through the P/Invoke layer. This
will allow you to pass a virtual key to the function, and it will return
an integer where the high order bit is set to one if it is down.

For toggle keys, like caps lock, and insert, then the low order bit
will be set to one, otherwise, it will be set to 0.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Pohihihi" <po******@hotmail.com> wrote in message
news:Ow**************@TK2MSFTNGP12.phx.gbl...
How to get the status of any key (e.g. Caps, Insert etc). I need to
display below on the form if insert/caps is enabled.

Thanks.


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: mark4asp | last post by:
Why won't the window.status message change ? IE ver. 6.0.2800.1106 displays the tooltip OK. <td> <A HREF="editAuthor.asp?item=4" title="Edit author details"...
2
by: Charles Mendell | last post by:
1. When I go to http://www.w3schools.com/js/default.asp and choose: 2. JS HTML DOM and then choose: 3. the Window object and then choose: 4. Write some text in the windows status bar ( a link)...
6
by: Ada | last post by:
i have a little bit of issue getting the status bar to work properly. this is what happens now. when the program loaded, the status is "READY..." the code is inside the FORM LOAD. i also...
19
by: Frances | last post by:
Firefox is not respecting window.status, examples in this pg http://www.csua.berkeley.edu/~jgwang/jsform02.htm are ignored by Firefox.. why is this.. is there a solution.. thank you.. Frances
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
4
by: Mark | last post by:
Hey folks, I'm looking at making the following query more efficient potentially using the ranking functions and I'd like some advice from the gurus. The purpose of the following is to have a...
3
by: bharathreddy | last post by:
This article will explain you how to find the status of the fax operation. (Using FAXCOM.dll). Author: Bharath Reddy VasiReddy Reference to the FAXCOM.DLL Reference to import FAXCOM...
0
by: Edwin.Madari | last post by:
updated creature running in its own thread will get you started. try it foryourself, change sleep times per your need. import os, sys, threading, time class Creature: def __init__(self,...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
0
by: tvnaidu | last post by:
I wrote a status page HTML code, here I have 8 port status, it prints first 7 and last status it won't print, from there onwards it won't print footer also, if I make 10 instead 8, then it prints...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.