Display form at cursor position

lidds

Well-known member
Joined
Oct 19, 2004
Messages
122
Programming Experience
Beginner
I am trying to use a windows form as a custom contextmenu which is fine as I have done a form with translucent background colour. However the problem is that I am having problems displaying the form at my cursor position. I have a mdi chaild form in my app and when I right click I want to display my custom contextmenu form at the point where I right click in the mdichild form. The only other thing is that I want the middle of the form to be displayed at the cursor point.

Thanks

Simon
 
Set the StartPosition of the form to Manual and then set its Location based on the Cursor.Position. Calculating the correct Location is simple maths. This is all done before calling Show.
 
Back
Top