Solved

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

Posted on 1998-05-08
2
323 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 50 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

Independent Software Vendors: 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!

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 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