Menu(s) in desktop application c#
Hello friend, how are you? All is well?
Today we will learn how to add menu(s) in our windows(desktop) application. We will use our previous example in which we had learned how to use mdi parent form. The link is here: Introduction to mdi parent form in desktop application
Download the project and open it.
Now to add menus in desktop application we need to add menustrip control to the form. Follow the image.
As you can see the menustrip control is in Menus & Tollbars group control.
Now drag the menu control to the form or just double click the menustrip, it will added automatically. Now add some menus. See the example in the picture.
Now double click on open menu you just created and write down the following code.
private void openToolStripMenuItem_Click(object sender, EventArgs e)
MessageBox.Show(“Hello!, You have clicked open menu”);
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
MessageBox.Show(“Hello!, You have clicked Exit menu”);
Download the project menustrip in desktop application here
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count: