明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3871|回复: 12

[JIG] 如何获取屏幕坐标?

[复制链接]
发表于 2013-10-31 18:43 | 显示全部楼层 |阅读模式
不通过鼠标点击获取屏幕坐标,而是鼠标不用点击即可获取鼠标位置坐标,请问各位大神该如何处理呢?
发表于 2013-10-31 19:42 | 显示全部楼层
PointMonitor
 楼主| 发表于 2013-10-31 21:57 | 显示全部楼层
本帖最后由 易晨托 于 2013-11-1 09:12 编辑

可以直接不用点击就获取吗?能再解释详细点吗?我是初学者,急急急,谢谢了。。。
发表于 2013-11-1 13:23 | 显示全部楼层
public event Autodesk.AutoCAD.EditorInput.PointMonitorEventHandler PointMonitor
    Autodesk.AutoCAD.EditorInput.Editor 的成员
------------------
这个事件里面可以取得当前鼠标光标所对应的坐标
发表于 2013-11-1 13:26 | 显示全部楼层
public Autodesk.AutoCAD.Geometry.Point3d ComputedPoint { get; }
    Autodesk.AutoCAD.EditorInput.InputPointContext 的成员
发表于 2013-11-1 13:27 | 显示全部楼层
public Autodesk.AutoCAD.EditorInput.InputPointContext Context { get; }
    Autodesk.AutoCAD.EditorInput.PointMonitorEventArgs 的成员
发表于 2013-11-1 13:27 | 显示全部楼层
public delegate void PointMonitorEventHandler(object sender, Autodesk.AutoCAD.EditorInput.PointMonitorEventArgs e)
    Autodesk.AutoCAD.EditorInput 的成员
 楼主| 发表于 2013-11-2 09:44 | 显示全部楼层
不好意思啊,请问一下,这个事件如何触发呢?还是不会啊 。。。
 楼主| 发表于 2013-11-3 21:50 | 显示全部楼层
各位大神,给力啊。。。
发表于 2013-11-5 00:04 | 显示全部楼层
using aApp = Autodesk.AutoCAD.ApplicationServices.Application;
aApp.DocumentManager.MdiActiveDocument.Editor.PointMonitor += new PointMonitorEventHandler(ed_PointMonitor);
    void ed_PointMonitor(object sender, PointMonitorEventArgs e)
    {
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-27 10:12 , Processed in 0.353885 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表