Context Menu strip
-
hi, i have created the form and placed the contextmenustrip on it, and enterd some values like copy,cut. And i called that when user clicks the MouseRight Button it is displaying. But at always at the Top of the window. How can I place it where ever user clciks. Pls help me With Regards Prasad
-
hi, i have created the form and placed the contextmenustrip on it, and enterd some values like copy,cut. And i called that when user clicks the MouseRight Button it is displaying. But at always at the Top of the window. How can I place it where ever user clciks. Pls help me With Regards Prasad
Hello, The ContextMenu property is a member of System.Windows.Forms.Control. So if you set the property correct, you don't have to care about the position of the menu.
System.Windows.Forms.ContextMenu contextMenu1 = new System.Windows.Forms.ContextMenu();
System.Windows.Forms.MenuItem.MenuItemCollection mic = new System.Windows.Forms.Menu.MenuItemCollection(contextMenu1);
mic.Add("test1");
mic.Add("test2");
button1.ContextMenu = contextMenu1;All the best, Martin
-
Hello, The ContextMenu property is a member of System.Windows.Forms.Control. So if you set the property correct, you don't have to care about the position of the menu.
System.Windows.Forms.ContextMenu contextMenu1 = new System.Windows.Forms.ContextMenu();
System.Windows.Forms.MenuItem.MenuItemCollection mic = new System.Windows.Forms.Menu.MenuItemCollection(contextMenu1);
mic.Add("test1");
mic.Add("test2");
button1.ContextMenu = contextMenu1;All the best, Martin
thank you with Regards prasad
-
Hello, The ContextMenu property is a member of System.Windows.Forms.Control. So if you set the property correct, you don't have to care about the position of the menu.
System.Windows.Forms.ContextMenu contextMenu1 = new System.Windows.Forms.ContextMenu();
System.Windows.Forms.MenuItem.MenuItemCollection mic = new System.Windows.Forms.Menu.MenuItemCollection(contextMenu1);
mic.Add("test1");
mic.Add("test2");
button1.ContextMenu = contextMenu1;All the best, Martin
:(( could not understand the coding please send me with windows application for clear understand
-
Hello, The ContextMenu property is a member of System.Windows.Forms.Control. So if you set the property correct, you don't have to care about the position of the menu.
System.Windows.Forms.ContextMenu contextMenu1 = new System.Windows.Forms.ContextMenu();
System.Windows.Forms.MenuItem.MenuItemCollection mic = new System.Windows.Forms.Menu.MenuItemCollection(contextMenu1);
mic.Add("test1");
mic.Add("test2");
button1.ContextMenu = contextMenu1;All the best, Martin
:(( could not understand the coding please send me with windows application for clear understand benharcharles@gmail.com