Autor Beitrag
volvox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 112

WIN XP
Delphi 7 Personal
BeitragVerfasst: Do 13.07.06 15:37 
Hi. Delphi kann doch auf bestimmte Tasten reagieren. Z.B. bei "OnKey Down" If Key = VK_SPACE ...

Geht das auch andersrum, also dass Delphi eine bestimmte Taste "drückt"?


Moderiert von user profile iconChristian S.: Topic aus Off Topic verschoben am Do 13.07.2006 um 15:40
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Do 13.07.06 16:03 
suchfunktion benutzen, hatten wir hier schon einige hundert mal
volvox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 112

WIN XP
Delphi 7 Personal
BeitragVerfasst: Do 13.07.06 17:35 
unter was soll ich denn gucken? taste? ausgabe? k.a. ich hab nix gefunden
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Do 13.07.06 17:45 

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
mderinger@netcom.de
Hält's aus hier
Beiträge: 9



BeitragVerfasst: Mi 02.08.06 12:26 
Titel: Taste drücken mit Delphi
So was kann man mit den WinAPIs machen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
...
   uses ShellApi, ShlObj
...
   var wHandle: THandle
   // Fenster suchen an das die Tastenkompination geschickt werden soll
   // wenn es dein eigenes Delphi Prog ist : Application.handle
      hWinProgman:=FindWindow(pchar('PROGMAN'), nil);
   // Taste schicken, z.B. F5 an den Desktop  
      PostMessage(hWinProgman, WM_KEYDOWN, VK_F5, 0);
      PostMessage(hWinProgman, WM_KEYUP  , VK_F5, 0);
...