Solved

NUMLOCK - CAPSLOCK - SCROLLLOCK

Posted on 1998-12-20
6
280 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now