Ahmad Muhammad
Ahmad Muhammad

Reputation: 41

MenuStrip not allowing to create menu

I'm using visual studio 2019 and I created a windows form app project. In the form when I drop MenuStrip it is not showing me a box of Type here to create menus. I searched the internet but I don't get any solution. Can anyone help me with this? Thanks in advance.

See image here

// Form1.Designer.cs

namespace asg_gui_F
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.SuspendLayout();
            // 
            // menuStrip1
            // 
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(800, 24);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(800, 450);
            this.Controls.Add(this.menuStrip1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip menuStrip1;
    }
}

Upvotes: 4

Views: 7006

Answers (5)

alereca
alereca

Reputation: 76

This issue has been fixed in Visual Studio latest release v16.10: 05/25/2021 (https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes). I have tested this both in net 5 (current) and net core 3.1 (LTS).

Demo: https://youtu.be/3s55hWrHx4U

Project setup Image proof

Upvotes: 1

ian
ian

Reputation: 11

figured it out instead of using core, use .netframework when creating forms

Upvotes: 1

Prem Singh Bist
Prem Singh Bist

Reputation: 1313

This problem has been typically showing up in latest version of visual basic studio such as visual studio community edition 2019. Please perform following steps in VB 2019 .

  1. Drag and Drop MenuStrip from Tool box
  2. Right Click on Menu Strip ITEMS ->EDITS - > Click on ADD ->Change name of text Property (eg: MyTest Menu)
  3. Scroll Down to [DATA] Property -->Double Click on Drop Down Items Property
  4. Click on Add (Tool Strip menu items will be added) ->
  5. Change the corresponding [text] property of sub item .

Upvotes: 0

  • Click on new Project.
  • Then Click on All Languages
  • Then Select C# Language
  • Then Click on Window Form App
  • Then click on Create
  • Then Choose your project name and location and click on the framework and make sure your framework is 4.0 then click on create.
  • Then Click on create

Upvotes: -3

Kal Petkoff
Kal Petkoff

Reputation: 39

Make sure when you create a project you select "Windows Forms App (.Net Framework)" and you will see "Type here".

Upvotes: 3

Related Questions