Visual Studio GUI Lab 2 Craig Duckett May 28, 2015 – An Article About Partial Classes and Partial Methods: Open Visual Studio New Project Select Visual C# > Windows Forms Application Name your Project and Solution MenuApp, and set the path to a folder on your desktop or thumb drive, etc. From the Toolbox, under the Menus & Toolbars tab, drag-drop the MenuStrip to the form. Click in the Type Here box, and type File Click in the Type Here box just below where you typed and type About; click in the File Type Here box below and type Exit. About Click in the Type Here box just to the right of and type Format. File In the two Type Here boxes below add Color and Font Format, Click on Color again, and add the following items: Black, Blue, Red, Green submenu Click on Font again, and add the following submenu items: Times New Roman, Courier, Comic Sans, a dash (to make a separator bar), Bold, Italic – If you want, you can test your menu bar by invoking Ctrl + F5 From the Toolbox, under the Common Controls tab, drag-drop a Label on the form, and in the Properties window change the Text to the Format menu to change the “Use appearance of this text.” Click back into the File menu, and double-click on About to bring up the MenuApp.Form1 code window. In the aboutToolStripMenuItem_Click method, add the following code: MessageBox.Show("This is an example of using menus.", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
Visual Studio GUI Lab 2 Craig Duckett – May 28, 2015 An Article About Partial Classes and Partial Methods: Open Visual Studio New Project Select Visual C# > Windows Forms Application Name your Project and Solution MenuApp, and set the path to a folder on your desktop or thumb drive, etc. From the Toolbox, under the Menus & Toolbars tab, drag-drop the MenuStrip to the form. Click in the Type Here box, and type File Click in the Type Here box just below where you typed File and type About; click in the Type Here box below About and type Exit. Click in the Type Here box just to the right of File and type Format. In the two Type Here boxes below Format, add Color and Font Click on Color again, and add the following submenu items: Black, Blue, Red, Green Click on Font again, and add the following submenu items: Times New Roman, Courier, Comic Sans, a dash – (to make a separator bar), Bold, Italic If you want, you can test your menu bar by invoking Ctrl + F5 From the Toolbox, under the Common Controls tab, drag-drop a Label on the form, and in the Properties window change the Text to “Use the Format menu to change the appearance of this text.” Click back into the File menu, and double-click on About to bring up the MenuApp.Form1 code window. In the aboutToolStripMenuItem_Click method, add the following code: MessageBox.Show("This is an example of using menus.", "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
Visual%20Studio%20GUI%20Lab%202.docx