I have inherited some C# source code written in Visual Studio 2010 targeting the .NET 2.0 framework. It comprises a simple Windows Forms application with a single form as its user interface.
The form contains a number of menu items, one of which allows the user to preview an image (acquired from a camera). An example of the program output is shown below, with the dark rectangle being the image.
I wish to rewrite the application from scratch for the .NET 4.6.2 Framework using Visual Studio 2019.
Recreating the form is straightforward. However, the component MenuItem
used for .NET 2.0 in VS2010 has been replaced by MenuStrip
and ToolStripMenuItem
in VS2019. When I build the updated version of the application, I can't make the menu strip operate in the same way. My output looks as shown below when the application runs.
NET4.6.2 Windows Form (VS2019)
As you can see, the top level menus are accessible but not visible. How can I locate the workspace image below the MenuStrip
?
I am hoping that the answer will be some MenuStrip
setting in Visual Studio's 'Properties' dialog box that I have overlooked.
Here's how the Properties currently appear in Form1.Designer.cs
:
// mainMenu1
//
this.mainMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuFile,
this.menuView,
this.menuSet,
this.menuDLL,
this.menuDevice});
this.mainMenu1.Location = new System.Drawing.Point(0, 0);
this.mainMenu1.Name = "mainMenu1";
this.mainMenu1.Size = new System.Drawing.Size(641, 24);
this.mainMenu1.TabIndex = 0;
this.mainMenu1.Text = "menuMenu1";