?
Solved

NUMLOCK - CAPSLOCK - SCROLLLOCK

Posted on 1998-12-20
6
Medium Priority
?
298 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
[X]
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
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 120 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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