mouse position with respect to screen

  • Thread starter Thread starter Neeraj
  • Start date Start date
N

Neeraj

hi
I want to use ContextMenuStrip .For that i use show() method.i can
not bind it as control.ContextMenuStrip= menu; becouse its
automatically comes on right mouse down.
So i am using menu.show() .method.
this method use parameter as point which is repect to screen .
How i can get mouse postion with respect to screen.when i write mouse
event of that control which add in on some other control.
Or you have any simple idea so that i can get ContextMenuStrip on
left mouse down.

Thanks
Neeraj Kumar
 
Neeraj,

If you have a mouse point in respect to the control itself, then you can
pass that point to the PointToScreen method on that control and get a point
that gives you the same point in relation to the screen.

Hope this helps.
 
Back
Top