Hi,
I have the following code to check the current state of the caps lock and display it in my status bar - which event should I link it to so it will run whenever keys are pressed in the program (Currently I have it attached to OnFormCreate and OnPaint).
procedure TfrmEditor.CheckCapslock ();
begin
if Odd (GetKeyState (VK_CAPITAL)) then
sbStatusBar.Panels[sbpCaps].Text := 'CAPS'
else
sbStatusBar.Panels[sbpCaps].Text := '';
end;
thanks
ozhiker
I have the following code to check the current state of the caps lock and display it in my status bar - which event should I link it to so it will run whenever keys are pressed in the program (Currently I have it attached to OnFormCreate and OnPaint).
procedure TfrmEditor.CheckCapslock ();
begin
if Odd (GetKeyState (VK_CAPITAL)) then
sbStatusBar.Panels[sbpCaps].Text := 'CAPS'
else
sbStatusBar.Panels[sbpCaps].Text := '';
end;
thanks
ozhiker