在 ActiveX 控件的正确位置显示 ContextMenuStrip
我有一个在 C# 中使用的 ActiveX 控件 (VB 6.0),其右键单击“e”参数有 int ex 和 int ey 现在我想显示该控件的上下文菜单条。它显示但不是在我右键单击鼠标的确切位置,它比我右键单击的位置高一些。
我写了这样的东西来解决位置问题,但没有解决它。
想法?我应该写什么才能将正确的位置发送给它?
m_contextPopup.Show(myActivexContorl.PointToClient(new Point(x, y)));
I have an ActiveX control (VB 6.0) that I am using in C# and its right click "e" param has
int e.x and int e.y
now I want to show the contextmenustrip for this contorl. It is showing but not at the exact location that I right click the mouse, it is some point higher that where I do the right click.
I wrote something like this to fix the location problem, did not fix it.
Thoughts? what should I write to send the correct location to it?
m_contextPopup.Show(myActivexContorl.PointToClient(new Point(x, y)));
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this: