Einzelnen Beitrag anzeigen

Popov
(Gast)

n/a Beiträge
 
#35

AW: Ermitteln ob die Maus auf der Form ist?

  Alt 14. Feb 2012, 02:33
Probier das mal aus. Sollte eigentlich das sein was du brauchst:

Delphi-Quellcode:
procedure TForm1.FormDeactivate(Sender: TObject);
begin
  ReleaseCapture;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if GetCapture = 0 then
    SetCapture(Handle);

  if PtInRect(BoundsRect, ClientToScreen(Point(x, y))) then
    Caption := 'Maus ist über der Form'
  else
    Caption := 'Maus ist außerhalb der Form';
end;
  Mit Zitat antworten Zitat