精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Delphi>>鼠标>>Re:怎么样让鼠标自动跑到一个控件上去?

主题:Re:怎么样让鼠标自动跑到一个控件上去?
发信人: soaringbird()
整理人: teleme(2001-05-08 12:34:38), 站内信件
【 在 stingzy 的大作中提到:】
:
:......
 procedure TForm1.Button3Click(Sender: TObject);
var
  p,p1: TPoint;
begin
  p.x := Button1.Left;
  p.y := Button1.Top;
  p1 := ClientToScreen(p);
  SetCursorPos(p1.x+10,p1.y+10);
end;

[关闭][返回]