Created
February 17, 2021 23:30
-
-
Save groundwater/248a6b1386f1dc999f1997d4afbae947 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Forms; | |
namespace WindowsFormsApp1 | |
{ | |
static class Program | |
{ | |
[STAThread] | |
static void Main() | |
{ | |
Application.EnableVisualStyles(); | |
Application.SetCompatibleTextRenderingDefault(false); | |
Application.Run(new Form2()); | |
} | |
} | |
} | |
public class Form2 : Form | |
{ | |
public Form2() | |
{ | |
this.IsMdiContainer = true; | |
MenuStrip ms = new MenuStrip(); | |
ToolStripMenuItem windowMenu = new ToolStripMenuItem("&Test&"); | |
windowMenu.DropDownItems.Add(new ToolStripMenuItem("&", null, new EventHandler(nothing))); | |
windowMenu.DropDownItems.Add(new ToolStripMenuItem("&test", null, new EventHandler(nothing))); | |
windowMenu.DropDownItems.Add(new ToolStripMenuItem("test&", null, new EventHandler(nothing))); | |
ms.Items.Add(windowMenu); | |
this.MainMenuStrip = ms; | |
this.Controls.Add(ms); | |
} | |
void nothing(object sender, EventArgs e) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment