Autor Beitrag
OliverN_26
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Fr 24.03.06 08:14 
Ich flippe gleich aus :-(
Lese mir hier alles durch und werd einfach nicht schlau daraus.
Ich möchte ganz einfach nur eine Tastenkombination (ALT+F4 oder ALT+D) simulieren, die startet, sobald ich nen Button drück.

Die SendKeys.pas habe ich eingebunden, aber wie in Gottes Namen sag ich denn jetz einfach dass diese Tasten gedrückt werden sollen? Wie sprech ich das an?

Ich weiß dieses Thema wird hier pausenlos diskutiert, aber ich raffs einfach net.
Wenn man so was 1x er folgreich gemacht hat, versteht man die funktionsweise, aber so ...

Vielen Dank im voraus.

greetz
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Fr 24.03.06 08:37 
Und was soll passieren, nachdem ALT-D gedrückt wurde?

_________________
Na denn, dann. Bis dann, denn.
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Fr 24.03.06 13:02 
Ich hab was mit nem Mauszeiger simuliert. Dabei öffnet sich allerdings ständig ein dämliches Fenster.
Ich möchte dem Programm einfach mit anhängen, dass dieses Fenster über ALT-F4 sofort wieder geschlossen werden soll.
Quasi so, als wenn ich Windows benutze. Da muss ich das Fenster auch nicht extra wieder aktivieren, sondern drück einfach ALT+F4 und dat Teil geht zu. Kann doch eigentlich gar net so schwer sein, oder ?

Danke schonmal

greetz
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Fr 24.03.06 14:35 
Schick dem Fenster doch einfach per SendMessage die Nachricht 'WM_CLOSE'. Etwas anderes macht Alt+D auch nicht.

_________________
Na denn, dann. Bis dann, denn.
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: Fr 24.03.06 17:10 
Die einzelnen Tastaturcodes hab ich ja.
Nur wie sieht der Code aus? Wie schreib ich das? Muss ich da bei "uses" noch was einbinden, oder was ähnliches?
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Fr 24.03.06 17:16 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
uses Windows;
...
SendMessage (TheDestinationWindowHandle, WM_CLOSE,0,0);
...

And: Read the manual ('SendMessage' und dann F1) :wink:

_________________
Na denn, dann. Bis dann, denn.
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Fr 24.03.06 17:36 
Wenn du nich weist wie du an das Handle des Fensters rankommst, das sich da öffnet, sieh dir mal www.x-spy.net an...

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
OliverN_26 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 252

Win7 64-Bit, WinXP SP3
Delphi 7 Enterprise
BeitragVerfasst: So 26.03.06 05:04 
Danke ... hat geklappt ... habs hin bekommen :-)