Einzelnen Beitrag anzeigen

Benutzerbild von malo
malo

Registriert seit: 19. Sep 2004
2.115 Beiträge
 
#5

Re: Form schliessen wenn die Maus das Form verlässt.

  Alt 6. Jun 2005, 16:05
Ich glaub ungefähr so:

Delphi-Quellcode:
type
  TForm1 = class(TForm)
    //Prozeduren und Objekte
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
    procedure WndProc(var Msg: TMessage); override;

//...

procedure TForm1.WndProc(var Msg: TMessage);
var
  Point: TPoint;
begin
  if Msg.Msg = WM_USER + 20 then
  begin
    if Msg.1Param = WM_MOUSELEAVE then
      FormX.Close;
  end;
  inherited;
end;
  Mit Zitat antworten Zitat