Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how do i show caps' num' scroll lock' insert in a statusbar panels

Posted on 1998-05-08
2
Medium Priority
?
326 Views
Last Modified: 2010-04-03
how do i show caps, num, scroll lock and insert key in a status bars Panels?
0
Comment
Question by:hyperion66
[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
2 Comments
 
LVL 4

Accepted Solution

by:
BoRiS earned 200 total points
ID: 1343480
here two meathods you can use :


Use a TTimer and in its OnTimer event do this:

if (GetKeyState(vk_Capital) and $1) = $1
then ShowMessage('Caps On') {Or update a property etc.} or statusbarpanel[0].text ......
else ShowMessage('Caps Off');

{Use vk_NumLock, vk_Scroll as above}




It's probably better to put this in an OnIdle event...like so:

procedure TMyForm.FormActivate(Sender: TObject);
begin
  inherited;
  Application.OnIdle := AppIdle;
end;

procedure TMyForm.AppIdle(Sender: TObject; var Done: Boolean);
begin
  IF GetKeyState(VK_CAPITAL) <> 0 THEN
    Begin
     StatusBar1.Panels.Items[0].Text := 'CapsLock';
    End
  ELSE
    Begin
     StatusBar1.Panels.Items[0].Text := '';
    End;
  Done := True;  {<- VERY important}
end;

Later
BoRiS
0
 

Author Comment

by:hyperion66
ID: 1343481
thank's again BoRiS's.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

610 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