本帖最后由 夏生生 于 2024-5-26 21:51 编辑
我尝试编写如下代码
- using System.Drawing;
- using System.Runtime.InteropServices;
- public class MouseHelper
- {
- [DllImport("user32.dll")]
- static extern bool GetCursorPos(out Point lpPoint);
- public static Point GetMousePosition()
- {
- Point mousePos;
- GetCursorPos(out mousePos);
- return mousePos;
- }
- }
编译成dll以后,regsvr32 dll,返回错误
再尝试
- (vl-cmdf"netload"(findfile "xty-get-mousepoint.dll"))
- (setq obj(vlax-create-object(findfile "xty-get-mousepoint.GetCursorPos")))
但是也不成功,哪位大佬指导一下啊,谢谢
|