Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

13 Experts available now in Live!

Get 1:1 Help Now