| Autor |
Beitrag |
Christian V.
      
Beiträge: 311
Win Xp Prof
Turbo Delphi 2005
|
Verfasst: Sa 05.03.05 13:38
Hallo, ich fange einen bestimmten Hotkey ab: ALT+u, dann kommt eine Meldung ob das Prog beendet werden soll. wenn ich es zum ersten mal aufrufe kommt es im Vordergrund, klicke ich auf nein und drücke nochmals ALT-u ist die meldung nicht im Vordergrund.
Noch was: die form wird bevor sie kreiert wird versteckt.
Delphi-Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24:
| if (msg.LparamLo=MOD_ALT) and (msg.LparamHi=85) then begin if application.MessageBox('Wirklich Beenden?','Frage',MB_YESNO)=IDYES then begin
f:=true; Form1.Close; end;
------------------------ program NVIDIA;
uses Forms, main in 'main.pas' ;
{$R *.res}
begin Application.Initialize; Application.ShowMainForm:=false; Application.CreateForm(TForm1, Form1); Application.Run; end. |
_________________ Hardware runs the world, software controls the hardware, code generates software - Have You already coded today?
|
|
retnyg
      
Beiträge: 2754
SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
|
Verfasst: Sa 05.03.05 18:27
SETFOREGROUNDWINDOW
falls ich dein problem richtig verstanden habe
_________________ es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
|
|
Christian V. 
      
Beiträge: 311
Win Xp Prof
Turbo Delphi 2005
|
Verfasst: So 06.03.05 10:36
Könntest du mir vielleicht gerade ein Beispiel machen?
Diese Seite von msdn kapier ich nämlich nicht so ganz<- ich weiss einfach nicht wie ich diese Befehle dann einbinde.
_________________ Hardware runs the world, software controls the hardware, code generates software - Have You already coded today?
|
|
retnyg
      
Beiträge: 2754
SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
|
Verfasst: So 06.03.05 13:46
Delphi-Quelltext 1: 2: 3: 4: 5:
| var hnd: hwnd; begin hnd:=findwindow(nil,'Delphi 7'); setforegroundwindow(hnd); end; |
_________________ es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
|
|
Christian V. 
      
Beiträge: 311
Win Xp Prof
Turbo Delphi 2005
|
Verfasst: Di 08.03.05 21:00
das problem ist, dass ich nicht weiss, wie ich machen soll, dass es dann beendet wirds, wenn ich auf ja klicke:
Delphi-Quelltext 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| else if (msg.LparamLo=MOD_ALT+MOD_CONTROL) and (msg.LparamHi=85) then begin
hnd:=findwindow(nil,'Delphi 7'); setforegroundwindow(hnd); if application.MessageBox('Wirklich Beenden?','Frage',MB_YESNO)=IDYES then begin
f:=true; Form1.Close;
end; |
_________________ Hardware runs the world, software controls the hardware, code generates software - Have You already coded today?
|
|
|