C# WinForms.. trying to get a contextMenu to show in TreeView when I right click - but nothing is happening
Code:private void mainView_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (mainView.SelectedNode == null) { Point ClickPoint = new Point(e.X, e.Y); Point ScreenPoint = mainView.PointToScreen(ClickPoint); Point FormPoint = this.PointToClient(ScreenPoint); cntxtMenuTreeNPCCreate.Show(this, FormPoint); } } }




Reply With Quote