Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
Re: Maus auf Mitte einer Komponente setzen
9. Sep 2008, 20:18
Hi,
So gehts:
Delphi-Quellcode:
// Maus soll in die Mitte von Panel1
var p: TPoint;
begin
P.x := (Panel1.Width div 2);
P.y := (Panel1.Height div 2);
Mouse.CursorPos := Panel1.ClientToScreen(P);
end;
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|