OnMouseEnter / OnMouseLeave?
EDIT: Ansonsten immer:
Delphi-Quellcode:
function MouseInRect(Rect: TRect; Control: TControl):Boolean;
var p: TPoint;
begin
p := Mouse.CursorPos;
if Control <> nil then
p := Control.ScreenToClient(p);
Result := (p.X >= Min(Rect.Left, Rect.Right)) and (p.X <= Max(Rect.Left, Rect.Right)) and (p.Y >= Min(Rect.Top, Rect.Bottom)) and p.Y <= Max(Rect.Top, Rect.Bottom);
end;
EDIT: Prozedur->Funkion
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1