本文介绍了MenuStrip 不允许创建菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Visual Studio 2019 并创建了一个 Windows 窗体应用程序项目.在我放下 MenuStrip 时的表单中,它没有向我显示用于创建菜单的 Type 框.我搜索了互联网,但没有得到任何解决方案.谁能帮我这个?提前致谢.
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.
// 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;
}
}
推荐答案
确保在创建项目时选择Windows Forms App (.Net Framework)";你会看到在此处输入".
Make sure when you create a project you select "Windows Forms App (.Net Framework)" and you will see "Type here".
这篇关于MenuStrip 不允许创建菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!