Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Problem mit Timer(GetKeyordstate) (https://www.delphipraxis.net/97585-problem-mit-timer-getkeyordstate.html)

Privateer3000 13. Aug 2007 08:47


Problem mit Timer(GetKeyordstate)
 
Hallo Leutz,
folgende Prozedur soll einen Timer die
Scroll-Led blinken lassen:
Delphi-Quellcode:
procedure TAuszahlbuch.ledscrollTimer(Sender: TObject);
begin
if keys[VK_SCROLL] = 0 then
begin GetKeyboardState(keys); keys[VK_SCROLL] := 1; SetKeyboardState(keys); end;
if keys[VK_SCROLL] = 1 then
begin GetKeyboardState(keys); keys[VK_SCROLL] :=0; SetKeyboardState(keys); end;
end;
Sie blinkt aber nicht, habe auch keinen Error.
Timer wird vorher auf enabled true gesetzt, Intervall steht auf 3000.
Bei menen Versuchen ergab unter WinMe kommt ein kurzel aufleuchten
unter XP passiert garnix.
Bei 3 Sekunden sollte doch nun wirklich was zu sehen sein, oder
mache ich was grundsätzliches falsch?

Greetz
Privateer3000

shmia 13. Aug 2007 10:44

Re: Problem mit Timer(GetKeyordstate)
 
Aus der OH:
Zitat:

Remarks
Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the NUM LOCK, CAPS LOCK, or SCROLL LOCK indicator lights on the keyboard.

Privateer3000 13. Aug 2007 12:43

Re: Problem mit Timer(GetKeyordstate)
 
Ja Danke,
aber das hilft mir offen gesagt garnicht weiter :-(

dajuhsa 13. Aug 2007 13:21

Re: Problem mit Timer(GetKeyordstate)
 
die led's sind auch eigentlich nicht dazu gedacht, ständig aus und an zu gehen aber guck mal hier


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz