Registriert seit: 5. Mai 2008
Ort: Oberschwaben
1.275 Beiträge
Delphi 11 Alexandria
|
AW: mousemove mousedown triggern
26. Feb 2014, 16:00
meinst du evtl so etwas?
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject) ;
var
Pt : TPoint;
begin
Application.ProcessMessages;
{Get the point in the center of Button 2}
Pt.x := Button2.Left + (Button2.Width div 2) ;
Pt.y := Button2.Top + (Button2.Height div 2) ;
{Convert Pt to screen coordinates and Mickeys}
Pt := ClientToScreen(Pt) ;
Pt.x := Round(Pt.x * (65535 / Screen.Width)) ;
Pt.y := Round(Pt.y * (65535 / Screen.Height)) ;
{Simulate the mouse move}
Mouse_Event(MOUSEEVENTF_ABSOLUTE or
MOUSEEVENTF_MOVE,
Pt.x, Pt.y, 0, 0) ;
gefunden bei : http://delphi.about.com/od/vclusing/a/mouseadvanced.htm
Hinter dir gehts abwärts und vor dir steil bergauf ! (Wolfgang Ambros)
|