I would like to have a context menu pop up, if I perform a right click somewhere on my TreeView (not the individual nodes).
This kinda works but the menu pops up way off the click position. I tried it with this trick HERE but it doesn't work.
Here is my code and a scrrenshot. Any ideas ?
private void Mainform_TreeView_MouseDown(object sender, MouseEventArgs e)
{
contextMenuStrip1.Show(PointToClient(Cursor.Position));
}