首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MenuStrip不允许创建菜单

MenuStrip不允许创建菜单
EN

Stack Overflow用户
提问于 2020-08-20 01:48:20
回答 5查看 4.9K关注 0票数 3

我使用的是visual studio 2019,我创建了一个windows form app项目。在表单中,当我放置MenuStrip时,它不会向我显示Type here to create menus的框。我在网上找过了,但没有找到任何答案。有人能帮我吗?提前谢谢。

代码语言:javascript
复制
// 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;
    }
}
EN

回答 5

Stack Overflow用户

发布于 2021-01-25 02:26:50

确保在创建项目时选择"Windows Forms App (.Net框架)“,您将看到"Type here”。

票数 2
EN

Stack Overflow用户

发布于 2021-04-11 02:00:04

解决了这个问题,在创建表单时使用.netframework而不是核心

票数 1
EN

Stack Overflow用户

发布于 2021-06-07 07:40:14

此问题已在Visual Studio最新版本v16.10: 05/25/2021 (https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes)中修复。我已经在net 5(当前版本)和net Core3.1 (LTS)中对此进行了测试。

演示:https://youtu.be/3s55hWrHx4U

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63492390

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档