• C# (Microsoft .NET)
• JAVA
• Dynamic HTML
• PHP & MySQL
• ASP.NET - C# & VB.NET
• Perl & CGI
• C | C++
• Vector Markup Language
• SMIL
• Assembler
• Databases
• Wap Development
• Web site promotion
• Web Marketing
|

|
How to create a context menu and attach it to a control?
(C# free example written by Anton Zamov.) |
How to create a context menu and attach it to a control?
System.Windows.Forms.ContextMenu contextMenu1;
contextMenu1 = new System.Windows.Forms.ContextMenu();
System.Windows.Forms.MenuItem menuItem1;
menuItem1 = new System.Windows.Forms.MenuItem();
System.Windows.Forms.MenuItem menuItem2;
menuItem2 = new System.Windows.Forms.MenuItem();
System.Windows.Forms.MenuItem menuItem3;
menuItem3 = new System.Windows.Forms.MenuItem();
contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {menuItem1, menuItem2, menuItem3});
menuItem1.Index = 0;
menuItem1.Text = "MenuItem1";
menuItem2.Index = 1;
menuItem2.Text = "MenuItem2";
menuItem3.Index = 2;
menuItem3.Text = "MenuItem3";
textBox1.ContextMenu = contextMenu1;
|
Still have questions?
Ask your question on TechOnlineHelp.com
or find more examples on www.netartmedia.net/examples
If this example was useful for you, please support my company and click Like on the button below.
Thank you very much!
|

|
Jobs Portal, poweful jobs board software
PHP Mall, multi vendors mall website software
Car Portal, php script for auto classifieds websites
NetArt Media, software products and services
Real Estate Portal, web software for real estate portals
Blog System, multi user blog hosting script
PHP Store, powerful e-commerce system written in PHP
Pharmacy System, software for running online pharmacies
|