Autor Beitrag
kad_we
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 78


D6; Turbo Delphi 2006
BeitragVerfasst: Do 13.11.03 11:13 
gibt es einhe möglichkeit, die kombination Alt + f4 auszuschalten, ohne dass das ereignis on close oder so aufgerufen wird??

thx im vorraus....
ixtreme
Gast
Erhaltene Danke: 1



BeitragVerfasst: Do 13.11.03 11:23 
ausblenden 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:
25:
26:
27:
28:
29:
public
  procedure AppMessage(var Msg: TMSG; var HAndled: Boolean);
end;

{...}

implementation

{...}

procedure TForm1.FormCreate(Sender: TObject);
begin
  // set your applications message handler to your new one
  Application.OnMessage := AppMessage;
end;

procedure TForm1.AppMessage(var Msg: TMSG; var Handled: Boolean);
begin
  // let your application handle all messages initially
  Handled := False;
  case Msg.Message of
    WM_SYSKEYDOWN:
      if Msg.wParam = VK_F4 then
        Handled := True; // don't allow ALT-F4
  end;
end;

//Or Write in the OnCloseQuery handler CanClose :=  False
//Oder schreibe im OnCloseQuery Ereignis CanClose := False


Quelle: swissdelphicenter.ch
kad_we Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 78


D6; Turbo Delphi 2006
BeitragVerfasst: Fr 14.11.03 09:42 
danke