Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

NUMLOCK - CAPSLOCK - SCROLLLOCK

Posted on 1998-12-20
6
285 Views
Last Modified: 2010-04-04
How can i turn on and off in my program and when user turn on numlock or capslock i will show it on status bar "CAP" - "NUM" like in office97

Thanks....
0
Comment
Question by:emiltor
6 Comments
 

Expert Comment

by:ItsMe
ID: 1352146
Look in "Available for 10% of their original value " "How do I set Numlock off ?"
You find the code for turning on/off num etc. You could find out if one of the keys
is pressed by using a timer.
0
 

Author Comment

by:emiltor
ID: 1352147
I need example code.......
i have a program with one statusbar when i click capslock or numlock i will set text to statusbar if the numlock is on the text should be "CAP" or for numlock "NUM" in the statusbar

thanks....
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 30 total points
ID: 1352148
for capslock  write:
keybd_event(VK_CAPITAL,0,0,0);
keybd_event(VK_CAPITAL,0,KEYEVENTF_KEYUP,0);
for numlock write:
keybd_event(VK_NUMLOCK,0,0,0);
keybd_event(VK_NUMLOCK,0,KEYEVENTF_KEYUP,0);
for scrolllock write:
keybd_event(VK_SCROLL,0,0,0);
keybd_event(VK_SCROLL,0,KEYEVENTF_KEYUP,0);
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:jecksom
ID: 1352149
Hi emiltor!

check http://www.fh-merseburg.de/~tietz/files/dt0596.txt , find 'numlock' word in
this document there is a complete source of key tracking/seting .

Best Regards,
 Jecksom.

0
 

Author Comment

by:emiltor
ID: 1352150
Great!!!!! thanks
0
 

Author Comment

by:emiltor
ID: 1352151
Ronit gets the point
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question