delphi'控件的相对坐标与屏幕坐标转换


本文整理自网络,侵删。

 
DELPHI 控件的相对坐标与屏幕坐标转换

一、直接上代码

var
  pt: TPoint;
  r: TRect;
begin
  pt := Point(Edit1.Top, Edit1.Left);
  pt := ClientToScreen(pt);
  Edit2.Text := inttostr(pt.X);
  Edit3.Text := inttostr(pt.y);
  Mouse.CursorPos := Point(pt.X, pt.y);
  GetWindowRect(Form2.Handle, r);
  Mouse.CursorPos := Point(r.Left + 20, r.Top + 150 + 20);
 

相关阅读 >>

Delphi 获取一个文件夹下的所有文件

Delphi 十进制十六进制转换

Delphi中最小化其他程序及所有程序窗口最小化

Delphi文件操作的一些函数

Delphi access violations 问题的解决之道

Delphi dbgrid查询内容的导出为txt函数

Delphi内联汇编的一点心得

Delphi示例代码 android,ios,osx,windows,linux,html5

Delphi bintohex和hextobin

Delphi 得到 winrar 处理解压缩文件的返回值 ?

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...