I have an ActiveX control (VB 6.0) th开发者_StackOverflow中文版at 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)));
Try this:
m_contextPopup.Show(
myActivexContorl,
myActivexContorl.PointToClient( Form.MousePosition ) );
精彩评论