OLEDragDrop 事件与已编译的 exe 一起使用,但在调试时不起作用
我们在一个较大的产品中使用 OLEDragDrop 事件,并偶然发现了一个奇怪的问题。在我的计算机上,如果我构建应用程序并运行 exe 文件,应用程序会看到拖放事件,我可以将文件从桌面拖到程序中,程序会保存该文件并执行其应该执行的操作。但是,当我进入调试模式时,相同的功能不起作用。我得到的只是一个图标切换到该图标,表明我无法释放该程序“顶部”的文件。
我的同事有相同的代码,来自同一版本的完全相同的代码,并且所有其他与项目相关的设置都完全相同。但他在调试时从应用程序中获得了预期的行为。我们唯一合理的猜测是他没有应用 Visual Studio 2010 sp1 的约 300mb 安全更新。我现在正在设置一个虚拟机来检查这一点,当我知道它是否确实可以在没有更新的情况下工作时,我会进行更新。
还有其他人遇到过与此相关的问题吗?任何能让我走上正轨的事情我都会永远感激不已。
感谢您的阅读。
We're using OLEDragDrop Event in one of our bigger products and have stumbled upon a strange issue. On my machine, if I build the application and run the exe-file, the application sees a drag-drop-event and I can drag a file from the desktop to the program and it saves it and does what it should do. However, when I go into debug-mode, this same function does not work. All I get is an icon-switch to the icon that indicates that I can't release the file "on top" of this program.
My co-worker has the same code, the exact same code from the same revision, and every other project-related setting is exactly the same. But he gets the expected behaviour from the application when debugging. The only reasonable guess we do have is that he hasn't applied the ~300mb security update for visual studio 2010 sp1. I'm right now setting up a virtual machine to check this out and will update when I know if it does indeed work without that update.
Has anyone else had a problem related to this one? Anything that could lead me on the right track I would be eternally grateful for.
Thanks for reading.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 Visual Studio 以管理员身份运行,您将无法拖动到应用程序上。
You won't be able to drag onto the application if Visual Studio is running as an administrator.