有没有办法暂停 ActiveX 控件 (MapPoint) 或异步运行 DoDragDrop?
我目前正在开发一个带有 MapPoint-Control 的应用程序,这给我带来了困难。 从线程(mappoint 也使用该线程)启动 DoDragDrop
后,几秒钟后我总是会从 Mappoint 收到一个对话框,说我的表单没有反应。
MapPoint-Control 是一个ActiveX-Control,使用MapPoint 控件在后台启动并在不同的线程中运行。我认为 Mappoint 尝试更新控件但超时。
有没有办法在不同的线程中运行 DoDragDrop
,以便 MapPoint 从主线程获取响应。 或者是否可以告诉 MapPoint 我的表单当前已暂停。或者我可以以某种方式暂停 MapPoint 吗?
我尝试使用表单控件和 MapPoint-Control 运行 DoDragDrop
I currently working on a application with a MapPoint-Control, which gives me a hard time.
After starting a DoDragDrop
from the thread, which mappoint also uses, i always get after a few secondes a dialog from mappoint saying my form doesn't react.
The MapPoint-Control is a ActiveX-Control, using the control MapPoint starts in the background and runs in a different thread. I think Mappoint trys to update the control but gets a timeout.
Is there a way to run DoDragDrop
in a different thread, so MapPoint get response from the mainthread.
Or is it possible to tell MapPoint my form is currently paused. Or can I somehow pause MapPoint?
I have tried to run the DoDragDrop
with the form control and with the MapPoint-Control
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到问题了。
我已在
BeforeClick
事件上触发了DoDragDrop
。 MapPoint 可能会等待事件回调,但不会得到回调,因为DoDragDrop
会保持事件一直持续到鼠标被释放为止。现在我已经编写了一个事件,它启动与 MapPoint
BeforeClick
事件异步的DoDragDrop
事件。代码:
I've found the problem.
I've fired
DoDragDrop
on theBeforeClick
-Event. MapPoint probably wait for the Events callback, but don't get one becauseDoDragDrop
keeps the Event up until the mouse is released.Now i have written a Event which starts the
DoDragDrop
Event async to the MapPointBeforeClick
-Event.Code: