我正在使用Visual Studio 2019,并创建了一个Windows窗体应用程序项目。在窗体中,当我拖放MenuStrip时,它没有显示“在此处输入类型以创建菜单”的框。我在互联网上搜索,但没有找到任何解决方案。有人可以帮助我吗?提前感谢。
// 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;
}
}
.Net Core
应用程序。从你的评论中可以看出...“我在网上搜索了但是没有找到任何解决方案。”...这是因为“大多数”解决方案将使用.Net Framework
而不是.Net Core
。除非你特别需要使用.Net Core
,否则建议你创建一个.Net Framework
应用程序,然后你搜索到的大多数解决方案也将使用.Net Framework
。不清楚是否必须使用.Net Core
,如果必须,则添加.Net Core
规范来优化你的搜索。 - JohnG