关于一个C#的窗口的状态栏 问题

图片说明

图片说明

状态栏我设置两个,结果就显示出一个,为什么呢?以下是design代码
namespace 窗体的综合
{
partial class FormMain
{
///
/// Required designer variable.
///
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()
    {
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
        this.menuStrip1 = new System.Windows.Forms.MenuStrip();
        this.系统ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.学生ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStrip1 = new System.Windows.Forms.ToolStrip();
        this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
        this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
        this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
        this.statusStrip1 = new System.Windows.Forms.StatusStrip();
        this.st1 = new System.Windows.Forms.ToolStripStatusLabel();
        this.st2 = new System.Windows.Forms.ToolStripStatusLabel();
        this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
        this.splitContainer1 = new System.Windows.Forms.SplitContainer();
        this.treeView1 = new System.Windows.Forms.TreeView();
        this.splitContainer2 = new System.Windows.Forms.SplitContainer();
        this.listView1 = new System.Windows.Forms.ListView();
        this.listBox1 = new System.Windows.Forms.ListBox();
        this.menuStrip1.SuspendLayout();
        this.toolStrip1.SuspendLayout();
        this.statusStrip1.SuspendLayout();
        ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
        this.splitContainer1.Panel1.SuspendLayout();
        this.splitContainer1.Panel2.SuspendLayout();
        this.splitContainer1.SuspendLayout();
        ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
        this.splitContainer2.Panel1.SuspendLayout();
        this.splitContainer2.Panel2.SuspendLayout();
        this.splitContainer2.SuspendLayout();
        this.SuspendLayout();
        // 
        // menuStrip1
        // 
        this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
        this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.系统ToolStripMenuItem,
        this.学生ToolStripMenuItem,
        this.帮助ToolStripMenuItem});
        this.menuStrip1.Location = new System.Drawing.Point(0, 0);
        this.menuStrip1.Name = "menuStrip1";
        this.menuStrip1.Size = new System.Drawing.Size(688, 28);
        this.menuStrip1.TabIndex = 0;
        this.menuStrip1.Text = "menuStrip1";
        // 
        // 系统ToolStripMenuItem
        // 
        this.系统ToolStripMenuItem.Name = "系统ToolStripMenuItem";
        this.系统ToolStripMenuItem.Size = new System.Drawing.Size(51, 24);
        this.系统ToolStripMenuItem.Text = "系统";
        // 
        // 学生ToolStripMenuItem
        // 
        this.学生ToolStripMenuItem.Name = "学生ToolStripMenuItem";
        this.学生ToolStripMenuItem.Size = new System.Drawing.Size(51, 24);
        this.学生ToolStripMenuItem.Text = "学生";
        // 
        // 帮助ToolStripMenuItem
        // 
        this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
        this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(51, 24);
        this.帮助ToolStripMenuItem.Text = "帮助";
        // 
        // toolStrip1
        // 
        this.toolStrip1.AutoSize = false;
        this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
        this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.toolStripButton2,
        this.toolStripButton3,
        this.toolStripButton1});
        this.toolStrip1.Location = new System.Drawing.Point(0, 28);
        this.toolStrip1.Name = "toolStrip1";
        this.toolStrip1.Size = new System.Drawing.Size(688, 103);
        this.toolStrip1.TabIndex = 1;
        this.toolStrip1.Text = "toolStrip1";
        // 
        // toolStripButton2
        // 
        this.toolStripButton2.AutoSize = false;
        this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
        this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton2.Name = "toolStripButton2";
        this.toolStripButton2.Size = new System.Drawing.Size(100, 100);
        this.toolStripButton2.Text = "toolStripButton2";
        // 
        // toolStripButton3
        // 
        this.toolStripButton3.AutoSize = false;
        this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
        this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton3.Name = "toolStripButton3";
        this.toolStripButton3.Size = new System.Drawing.Size(100, 100);
        this.toolStripButton3.Text = "toolStripButton3";
        // 
        // toolStripButton1
        // 
        this.toolStripButton1.AutoSize = false;
        this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
        this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton1.Name = "toolStripButton1";
        this.toolStripButton1.Size = new System.Drawing.Size(100, 100);
        this.toolStripButton1.Text = "toolStripButton1";
        // 
        // statusStrip1
        // 
        this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
        this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.st1,
        this.st2,
        this.toolStripStatusLabel1});
        this.statusStrip1.Location = new System.Drawing.Point(0, 512);
        this.statusStrip1.Name = "statusStrip1";
        this.statusStrip1.Size = new System.Drawing.Size(688, 29);
        this.statusStrip1.TabIndex = 2;
        this.statusStrip1.Text = "statusStrip1";
        // 
        // st1
        // 
        this.st1.AutoToolTip = true;
        this.st1.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) 
        | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) 
        | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
        this.st1.BorderStyle = System.Windows.Forms.Border3DStyle.Bump;
        this.st1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.st1.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
        this.st1.Name = "st1";
        this.st1.Size = new System.Drawing.Size(317, 24);
        this.st1.Spring = true;
        this.st1.Text = "  ";
        this.st1.Click += new System.EventHandler(this.toolStripStatusLabel1_Click);
        // 
        // st2
        // 
        this.st2.AutoToolTip = true;
        this.st2.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) 
        | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) 
        | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
        this.st2.BorderStyle = System.Windows.Forms.Border3DStyle.Adjust;
        this.st2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
        this.st2.ImageAlign = System.Drawing.ContentAlignment.BottomRight;
        this.st2.Name = "st2";
        this.st2.Size = new System.Drawing.Size(317, 24);
        this.st2.Spring = true;
        this.st2.Click += new System.EventHandler(this.st2_Click);
        // 
        // toolStripStatusLabel1
        // 
        this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
        this.toolStripStatusLabel1.Size = new System.Drawing.Size(0, 24);
        // 
        // splitContainer1
        // 
        this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.splitContainer1.Location = new System.Drawing.Point(0, 131);
        this.splitContainer1.Name = "splitContainer1";
        // 
        // splitContainer1.Panel1
        // 
        this.splitContainer1.Panel1.Controls.Add(this.treeView1);
        // 
        // splitContainer1.Panel2
        // 
        this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
        this.splitContainer1.Size = new System.Drawing.Size(688, 381);
        this.splitContainer1.SplitterDistance = 229;
        this.splitContainer1.TabIndex = 3;
        // 
        // treeView1
        // 
        this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.treeView1.Location = new System.Drawing.Point(0, 0);
        this.treeView1.Name = "treeView1";
        this.treeView1.Size = new System.Drawing.Size(229, 381);
        this.treeView1.TabIndex = 0;
        // 
        // splitContainer2
        // 
        this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
        this.splitContainer2.Location = new System.Drawing.Point(0, 0);
        this.splitContainer2.Name = "splitContainer2";
        this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
        // 
        // splitContainer2.Panel1
        // 
        this.splitContainer2.Panel1.Controls.Add(this.listView1);
        // 
        // splitContainer2.Panel2
        // 
        this.splitContainer2.Panel2.Controls.Add(this.listBox1);
        this.splitContainer2.Panel2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
        this.splitContainer2.Size = new System.Drawing.Size(455, 381);
        this.splitContainer2.SplitterDistance = 37;
        this.splitContainer2.TabIndex = 0;
        // 
        // listView1
        // 
        this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.listView1.Location = new System.Drawing.Point(0, 0);
        this.listView1.Name = "listView1";
        this.listView1.Size = new System.Drawing.Size(455, 37);
        this.listView1.TabIndex = 0;
        this.listView1.UseCompatibleStateImageBehavior = false;
        // 
        // listBox1
        // 
        this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.listBox1.FormattingEnabled = true;
        this.listBox1.ItemHeight = 20;
        this.listBox1.Location = new System.Drawing.Point(0, 0);
        this.listBox1.Name = "listBox1";
        this.listBox1.Size = new System.Drawing.Size(455, 340);
        this.listBox1.TabIndex = 0;
        // 
        // FormMain
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(688, 541);
        this.Controls.Add(this.splitContainer1);
        this.Controls.Add(this.statusStrip1);
        this.Controls.Add(this.toolStrip1);
        this.Controls.Add(this.menuStrip1);
        this.MainMenuStrip = this.menuStrip1;
        this.Name = "FormMain";
        this.Text = "FormMain";
        this.Load += new System.EventHandler(this.FormMain_Load);
        this.menuStrip1.ResumeLayout(false);
        this.menuStrip1.PerformLayout();
        this.toolStrip1.ResumeLayout(false);
        this.toolStrip1.PerformLayout();
        this.statusStrip1.ResumeLayout(false);
        this.statusStrip1.PerformLayout();
        this.splitContainer1.Panel1.ResumeLayout(false);
        this.splitContainer1.Panel2.ResumeLayout(false);
        ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
        this.splitContainer1.ResumeLayout(false);
        this.splitContainer2.Panel1.ResumeLayout(false);
        this.splitContainer2.Panel2.ResumeLayout(false);
        ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
        this.splitContainer2.ResumeLayout(false);
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.MenuStrip menuStrip1;
    private System.Windows.Forms.ToolStripMenuItem 系统ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 学生ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
    private System.Windows.Forms.ToolStrip toolStrip1;
    private System.Windows.Forms.ToolStripButton toolStripButton2;
    private System.Windows.Forms.StatusStrip statusStrip1;
    private System.Windows.Forms.ToolStripStatusLabel st1;
    private System.Windows.Forms.ToolStripStatusLabel st2;
    private System.Windows.Forms.SplitContainer splitContainer1;
    private System.Windows.Forms.SplitContainer splitContainer2;
    private System.Windows.Forms.ToolStripButton toolStripButton3;
    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
    private System.Windows.Forms.TreeView treeView1;
    private System.Windows.Forms.ListView listView1;
    private System.Windows.Forms.ListBox listBox1;
    private System.Windows.Forms.ToolStripButton toolStripButton1;
}

}

c#
0

3个回答

要把你的窗体的代码窗体.cs以及窗体.design.cs贴出来看下

图片说明

参考代码:

namespace Q716854
{
    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.系统ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.学生ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
            this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
            this.statusStrip1 = new System.Windows.Forms.StatusStrip();
            this.st1 = new System.Windows.Forms.ToolStripStatusLabel();
            this.st2 = new System.Windows.Forms.ToolStripStatusLabel();
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.treeView1 = new System.Windows.Forms.TreeView();
            this.splitContainer2 = new System.Windows.Forms.SplitContainer();
            this.listView1 = new System.Windows.Forms.ListView();
            this.listBox1 = new System.Windows.Forms.ListBox();
            this.menuStrip1.SuspendLayout();
            this.toolStrip1.SuspendLayout();
            this.statusStrip1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
            this.splitContainer2.Panel1.SuspendLayout();
            this.splitContainer2.Panel2.SuspendLayout();
            this.splitContainer2.SuspendLayout();
            this.SuspendLayout();
            // 
            // menuStrip1
            // 
            this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.系统ToolStripMenuItem,
            this.学生ToolStripMenuItem,
            this.帮助ToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2);
            this.menuStrip1.Size = new System.Drawing.Size(516, 24);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // 系统ToolStripMenuItem
            // 
            this.系统ToolStripMenuItem.Name = "系统ToolStripMenuItem";
            this.系统ToolStripMenuItem.Size = new System.Drawing.Size(45, 20);
            this.系统ToolStripMenuItem.Text = "系统";
            // 
            // 学生ToolStripMenuItem
            // 
            this.学生ToolStripMenuItem.Name = "学生ToolStripMenuItem";
            this.学生ToolStripMenuItem.Size = new System.Drawing.Size(45, 20);
            this.学生ToolStripMenuItem.Text = "学生";
            // 
            // 帮助ToolStripMenuItem
            // 
            this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
            this.帮助ToolStripMenuItem.Size = new System.Drawing.Size(45, 20);
            this.帮助ToolStripMenuItem.Text = "帮助";
            // 
            // toolStrip1
            // 
            this.toolStrip1.AutoSize = false;
            this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripButton2,
            this.toolStripButton3,
            this.toolStripButton1});
            this.toolStrip1.Location = new System.Drawing.Point(0, 24);
            this.toolStrip1.Name = "toolStrip1";
            this.toolStrip1.Size = new System.Drawing.Size(516, 89);
            this.toolStrip1.TabIndex = 1;
            this.toolStrip1.Text = "toolStrip1";
            // 
            // toolStripButton2
            // 
            this.toolStripButton2.AutoSize = false;
            this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton2.Name = "toolStripButton2";
            this.toolStripButton2.Size = new System.Drawing.Size(100, 100);
            this.toolStripButton2.Text = "toolStripButton2";
            // 
            // toolStripButton3
            // 
            this.toolStripButton3.AutoSize = false;
            this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton3.Name = "toolStripButton3";
            this.toolStripButton3.Size = new System.Drawing.Size(100, 100);
            this.toolStripButton3.Text = "toolStripButton3";
            // 
            // toolStripButton1
            // 
            this.toolStripButton1.AutoSize = false;
            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.toolStripButton1.Name = "toolStripButton1";
            this.toolStripButton1.Size = new System.Drawing.Size(100, 100);
            this.toolStripButton1.Text = "toolStripButton1";
            // 
            // statusStrip1
            // 
            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.st1,
            this.st2});
            this.statusStrip1.Location = new System.Drawing.Point(0, 447);
            this.statusStrip1.Name = "statusStrip1";
            this.statusStrip1.Size = new System.Drawing.Size(516, 22);
            this.statusStrip1.TabIndex = 2;
            this.statusStrip1.Text = "statusStrip1";
            // 
            // st1
            // 
            this.st1.AutoSize = false;
            this.st1.Name = "st1";
            this.st1.Size = new System.Drawing.Size(200, 17);
            this.st1.Text = "st1";
            // 
            // st2
            // 
            this.st2.AutoSize = false;
            this.st2.Name = "st2";
            this.st2.Size = new System.Drawing.Size(301, 17);
            this.st2.Spring = true;
            this.st2.Text = "st2";
            // 
            // splitContainer1
            // 
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 113);
            this.splitContainer1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
            this.splitContainer1.Name = "splitContainer1";
            // 
            // splitContainer1.Panel1
            // 
            this.splitContainer1.Panel1.Controls.Add(this.treeView1);
            // 
            // splitContainer1.Panel2
            // 
            this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
            this.splitContainer1.Size = new System.Drawing.Size(516, 334);
            this.splitContainer1.SplitterDistance = 171;
            this.splitContainer1.SplitterWidth = 3;
            this.splitContainer1.TabIndex = 4;
            // 
            // treeView1
            // 
            this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.treeView1.Location = new System.Drawing.Point(0, 0);
            this.treeView1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
            this.treeView1.Name = "treeView1";
            this.treeView1.Size = new System.Drawing.Size(171, 334);
            this.treeView1.TabIndex = 0;
            // 
            // splitContainer2
            // 
            this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer2.Location = new System.Drawing.Point(0, 0);
            this.splitContainer2.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
            this.splitContainer2.Name = "splitContainer2";
            this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
            // 
            // splitContainer2.Panel1
            // 
            this.splitContainer2.Panel1.Controls.Add(this.listView1);
            // 
            // splitContainer2.Panel2
            // 
            this.splitContainer2.Panel2.Controls.Add(this.listBox1);
            this.splitContainer2.Panel2.Font = new System.Drawing.Font("SimSun", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.splitContainer2.Size = new System.Drawing.Size(342, 334);
            this.splitContainer2.SplitterDistance = 32;
            this.splitContainer2.SplitterWidth = 3;
            this.splitContainer2.TabIndex = 0;
            // 
            // listView1
            // 
            this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.listView1.Location = new System.Drawing.Point(0, 0);
            this.listView1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
            this.listView1.Name = "listView1";
            this.listView1.Size = new System.Drawing.Size(342, 32);
            this.listView1.TabIndex = 0;
            this.listView1.UseCompatibleStateImageBehavior = false;
            // 
            // listBox1
            // 
            this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.listBox1.FormattingEnabled = true;
            this.listBox1.ItemHeight = 16;
            this.listBox1.Location = new System.Drawing.Point(0, 0);
            this.listBox1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
            this.listBox1.Name = "listBox1";
            this.listBox1.Size = new System.Drawing.Size(342, 299);
            this.listBox1.TabIndex = 0;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(516, 469);
            this.Controls.Add(this.splitContainer1);
            this.Controls.Add(this.statusStrip1);
            this.Controls.Add(this.toolStrip1);
            this.Controls.Add(this.menuStrip1);
            this.MainMenuStrip = this.menuStrip1;
            this.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
            this.Name = "Form1";
            this.Text = "FormMain";
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.toolStrip1.ResumeLayout(false);
            this.toolStrip1.PerformLayout();
            this.statusStrip1.ResumeLayout(false);
            this.statusStrip1.PerformLayout();
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
            this.splitContainer1.ResumeLayout(false);
            this.splitContainer2.Panel1.ResumeLayout(false);
            this.splitContainer2.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
            this.splitContainer2.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem 系统ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 学生ToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem 帮助ToolStripMenuItem;
        private System.Windows.Forms.ToolStrip toolStrip1;
        private System.Windows.Forms.ToolStripButton toolStripButton2;
        private System.Windows.Forms.ToolStripButton toolStripButton3;
        private System.Windows.Forms.ToolStripButton toolStripButton1;
        private System.Windows.Forms.StatusStrip statusStrip1;
        private System.Windows.Forms.ToolStripStatusLabel st1;
        private System.Windows.Forms.ToolStripStatusLabel st2;
        private System.Windows.Forms.SplitContainer splitContainer1;
        private System.Windows.Forms.TreeView treeView1;
        private System.Windows.Forms.SplitContainer splitContainer2;
        private System.Windows.Forms.ListView listView1;
        private System.Windows.Forms.ListBox listBox1;
    }
}
0
caozhy
weixin_45841714 回复qq_43412960: 看图
6 个月之前 回复
qq_43412960
qq_43412960 回复: 发到评论了
6 个月之前 回复
qq_43412960
qq_43412960 我把代码截图了
6 个月之前 回复

图片说明

图片说明

0
qq_43412960
qq_43412960 回复caozhy: 发了 它有那么长
6 个月之前 回复
caozhy
weixin_45841714 这个没用。第一,你要发文本格式的,用</>格式化下,第二,designer.cs的代码最关键,你没有发
6 个月之前 回复

您好,看起来您的这个状态栏可以是第一个把第二个给挡住了,请您缩短第一个状态栏的宽度,再次运行尝试。
如果解决了您的问题,请点击采纳,如果并没有,请在下方留言,我会继续帮您解答。

-1
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
C# WindowForm窗体-菜单栏、状态栏设计--(学生管理系统项目)
菜单栏菜单栏思路: 目录,下拉菜单,图标,分割线,下层菜单(不够还可更多层添加),对应的Id 、Alt快捷键……………………….创建目录并添加快捷键Alt+对应的字母 系统-修改密码、退出……. 输入 :‘系统(&S)’ 添加图标 ico后缀名的格式图标,分割线参考地址图片 http://ico.58pic.com/icon/154244.html添加对应的Id依次输入学员管理系统、成绩管
c#在控制窗体最大化时不覆盖状态栏
c#在控制窗体最大化时不覆盖状态栏
请问在C#中如何将最小化后的窗口从Windows的状态栏上消失?
小弟这里用到了“NotifyIcon”控件,可以使窗体在启动时在Windows状态栏右下角中显示。但是状态栏上还有该窗体。请问在C#中如何将最小化后的窗口从Windows的状态栏上消失?
在Windows应用程序中设计菜单栏、工具栏和状态栏
1.5.2  在Windows应用程序中设计菜单栏、工具栏和状态栏 1.菜单栏的设计 在Windows应用程序中制作菜单栏时,可以使用MenuStrip控件。使用MenuStrip控件可以将菜单设计成Microsoft Office中那样。另外,用户还可以通过添加快捷键、选中标记、图像和分隔条,来增强菜单的可用性和可读性。使用MenuStrip控件制作菜单栏的步骤如下。 (1)向
关于一个c#窗口状态栏的问题
![图片说明](https://img-ask.csdn.net/upload/201812/16/1544935967_641459.png)rnrnrnrnrnrnrnrn![图片说明](https://img-ask.csdn.net/upload/201812/16/1544935982_324640.png)rnrnrnrnrnrnrn我在设计窗体状态栏的时候,设置了两个栏,运行后,只显示了一个栏,为什么呢?
winform中的状态栏,以及在状态栏目上显示时间
1:在winform上添加状态栏,并且在状态栏目上多添加几个label。step1:拖一个StatusStrip到winform上,名字默认为statusStrip1。找到statusStrip1的items属性,双击打开添加3个StatusLabel。名字默
c# winForm 将窗体状态栏StatusStrip 分成左中右三部分
http://www.cnblogs.com/freeliver54/archive/2008/11/03/1325252.html 实现效果: 通过StatusStrip显示窗体状态栏 同时将状态栏分成三部分 居左边显示相关文字信息 中间空白显示 居右边显示时间信息 1.创建窗体及添加StatusStrip   默认StatusStrip名称为statusSt
状态栏的使用详解
博客来源:鸡啄米  状态栏简介        状态栏相信大家在很多窗口中都能见到,它总是用来显示各种状态。状态栏实际上也是一个窗口,一般分为几个窗格,每个窗格分别用来显示不同的信息和状态等,如菜单项和工具栏按钮的提示信息。        用MFC向导生成的单文档或多文档程序都会自动创建状态栏,大家可以运行下VS2010/MFC编程入门之三十四(菜单:VS2010菜单资源详解)中创
Visual Studio 2010——C#状态栏控件的使用
实验环境:Windows XP,Visual Studio 2010  Ultimate 1 创建项目     文件>>新建>>项目,选中“Windows窗体应用程序”,如下图所示:      2 点击菜单栏的“视图”,依次找到“解决方案资源管理器”,“工具箱”和“属性窗口”,分别点击它们。菜单如下图所示。 创建好工程后,效果图如下图所示 3 添
窗体最大化后,状态栏怎么跟着变化,statusbar
窗体最大化后,状态栏怎么跟着变化呀?? :OnInitDialog()里面添加的下面代码,给基本对话框的mfc程序添加的状态栏,想要,窗体变化时,状态栏也变化,怎么办? //////////////////////////////////////////////////////////////////////////////////////////////////////////////
js生成一个没有工具栏状态栏的窗口
新建窗口 记录一下
C#状态栏设计丢失的恢复
C#状态栏设计丢失的恢复方法 程序症状: 由于状态栏图片资源丢,造成程序出错,进而造成以前设计的状态栏全部无显示。 解决办法: 1)在窗体属性下拉列表框内可以找以前设计的控件,复制一个控件名。 2)打开程序的查找对话框粘贴查到查找里,找整个解决方案,可以在窗体的xxx..Designer.cs找到控件的布局。 3)在每一个控件布局下加             this.sta
WPF编程,指定窗口图标、窗口标题,使得在运行状态下任务栏显示窗口图标的一种方法。
WPF默认的窗口,如果采用默认的标题与图标,运行状态下在任务栏中显示的图标就比较难看~ 如果要更改在任务栏的显示图标,需要设定窗口的Icon属性。这里给出一种方法。 方法一、前台指定  1)添加图片到项目中 2)在窗口属性中设置icon 方法二、后台C#指定 可以放在构造函数里,也可以放在事件中。 public MainWindow() ...
如何使链接打开一个没有菜单栏、地址栏、工具条和状态栏的窗口
<br /> 一般通过 <a bref="link.htm" target=_blank>我的链接</a> 打开一个链接,新打开的IE窗口包含菜单栏、地址栏、工具条和状态栏。如果想打开一个没有菜单栏、地址栏、工具条和状态栏的窗口,要使用Javascript的window.open()函数。格式为 <a bref="#" onclick='Javascript:window.open("link.htm","_blank","height=300,width=400,top=200,left=400 ,sta
wpf 状态栏图标背景闪烁提醒 FlashWindowEx
using System; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Interop; namespace XCommon { public static class WindowExtensions { #region Window Flashing API Stuf
C#窗体程序--简单文本编辑器
建立一个窗体文件,实现对文件的编辑保存和对txt文件的打开 界面设计: 程序源代码://form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using
状态栏的设计和使用
状态栏窗口既不接受用户输入也不产生命令消息,它的作用就是在程序的控制下在窗格中显示一些文本。状态栏可支持两种类型的文本窗口——信息行窗口和状态指示器窗格。为了能够在状态栏中显示一些应用程序的特殊数据,我们必须首先禁止标准状态栏显示菜单提示及键盘状态。 3.3.1 状态栏的定义 应用程序在MainFrm.cpp文件中所产生的静态indicator数组就是用来定义状态栏的,其中ID_SEPARAT
C# winform窗体在桌面右下角显示(任务栏上方)
举例要在form2中打开form3窗体,在右下角显示。 form2中写:        form3 form=new form3();         form.show(); 在from3自动生成代码中写:         public Form3()         {             InitializeComponent();             int x =
C#Windows窗体界面设计_05_添加菜单栏 工具栏 状态栏 按钮
binzhouweichao@163.com 2013-10-17 仍然使用上篇的项目。 实现的作用为: 通过菜单栏,或工具栏,或按钮,实现图片框中图像的显示和隐藏。 1. 更改窗体大小 由于添加的控件比较多,默认的窗体300*300肯定不够用的,需要将窗体大小调大。现更改为800*600。 打开TriPaint.cs[设计]文件,选中窗体,在右下角的属性窗口中,找到Size
C# WinForm状态栏实时显示当前时间(窗体状态栏StatusStrip示例)
  实现效果:通过StatusStrip显示窗体状态栏,同时将状态栏分成三部分: 居左边显示相关文字信息及时间信息,中间操作系统登录名,居右边显示本地IP。   步骤: 1.创建窗体及添加StatusStrip 默认StatusStrip名称为statusStrip1 2.在statusStrip1的Items属性中 添加三个StatusLabel 默认名称为toolStri...
c# WinForm 多次点击这个按钮会弹出多个窗体, 怎么才能只显示一个窗体。解决方案!
多次点击这个按钮会弹出多个窗体, 怎么才能只显示一个窗体? 第一种解决方法 “单例” 点击按钮弹出窗体 private void toolStripLabel1_Click(object sender, EventArgs e) { AddStudent add=AddStudent.AddStudentCreateInstance();...
JavaSwing实现完整的菜单栏、工具栏和状态栏的GUI窗口
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseListener; import java.awt.event.MouseAdapter; import java.awt.event.KeyEvent; import java.awt.event.
win32sdk学习-创建一个状态栏
实际应用中,通常一个程序都有一个底部状态栏来显示一些信息,比如绘图软件,通常是在状态栏上显示鼠标位置。 我们使用CreateWindow来创建一个状态栏窗口,尽管其内部也是调用CreateWindowEX,但具体没有什么差别。 hwndStatus=CreateWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD d
在C#里面实现打开的WEB窗口没有菜单栏,地址栏,工具栏
参数解释:
Qt工作笔记-QMainWindow自定义窗体中利用状态栏进行窗体放缩
目录   原理 关键代码   原理 在QDialog和QWidget中一般使用重写: void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mouseReleaseEvent...
JavaScript中的window对象 (状态栏动态文字实例)
window对象在js中经常会提到, 在具体了解之前经常会感觉疑惑, window到底是个啥, 这篇就是用来介绍window给和我一样的菜鸟 Window - 浏览器对象模型 为什么说浏览器对象呢? 因为window对象它表示浏览器窗口或一个框架, 与windows操作系统没啥关系 window对象是整个JavaScript脚本运行的顶层对象 所有 JavaScript 全局对象、函数...
Qt5主窗口状态栏显示时间
使用Qt Creator创建默认的窗体程序后,主窗口QMainWindow有statusBar状态栏,在此状态栏实时显示时间可以使用下面方法实现: mainwindow.h文件内容: #ifndef MAINWINDOW_H #define MAINWINDOW_H #include &amp;amp;lt;QMainWindow&amp;amp;gt; #include &amp;amp;lt;mydialog.h&amp;amp;gt; #include...
VC在对话框窗口上添加状态栏
VC在对话框上添加状态栏,没有可视化的控件,要用类来创建。 1、在窗口.h文件中添加成员变量 CStatusCtrl  m_status; 2、在窗口的OnInitDialog函数中添加创建代码: RECT m_Rect; GetClientRect(&m_Rect); //获取对话框的矩形区域 m_Rect.top = m_Rect.bottom-
PyQt5学习第一发(基础窗口创建 菜单栏 工具栏 状态栏 )
早就知道PyQt的强大,正好需要学GUI,开好多网上课程并没有有关pyqt的讲解,基本上用的要么是wxpython要么是tk,其实pyQt也很厉害,所以,学习pyqt只能借助博客了, 下面是初试pyQt的代码import sys from PyQt5.QtWidgets import QApplication,QToolTip,QPushButton,QMessageBox,QTextEd
C# winform 获取标题栏,状态栏,菜单栏的高度
MessageBox.Show(&quot;当前窗体标题栏高度&quot;+(this.Height - this.ClientRectangle.Height).ToString());//获得当前窗体标题栏高度 ClientRectangle//获取表示控件的工作区的矩形 MessageBox.Show(SystemInformation.PrimaryMonitorSize.ToString()); ...
四行C#代码实现状态栏中加载进度条
[转载]四行C#代码实现状态栏中加载进度条! 原文地址:四行C#代码实现状态栏中加载进度条!作者:Tuliplanetrain       我们在做程序的很多时候都需要用状态栏来显示程序运行的状态信息,有时我们又需要将程序的运行状态用进度条的形式显示出来,而不想占用面板空间,所以想把进度条放到状态栏中,将二者相结合。这样做即省面板空间又美观。     笔者在用C#做
Windows获取状态栏的窗口及图标
  实现代码 目录 实现代码 说明 参数:GW_OWNER   获取图标的方法 Qt转换HICON为QPixmap 写回调函数: //获取到一个窗口就会调用一次 BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) { /* * Remarks The EnumWindows funct...
Android---解决PopupWindow无法覆盖状态栏
当sdk &amp;gt; 21,PopupWindow在标题栏没有办法遮罩 有两种方法: 方法1: popupWindow.setClippingEnabled(false); 方法2: if (Build.VERSION.SDK_INT &amp;gt;= Build.VERSION_CODES.LOLLIPOP) { try {...
C#学习记录(40)windows应用程序基础之工具栏、状态栏
一.工具栏    添加工具栏控件。然后可以在工具栏上添加工具项目。1.按钮(用的最多)    只需要给按钮添加Image和Click事件名,Click事件名与菜单项对应的事件名相同,则可以调用菜单栏的事件响应函数。2.便签    显示功能3.SplitButton 带下拉按钮的按钮    就是按钮和菜单栏的组合体4.下拉菜单    单击就会弹出下拉菜单5.组合框6.进度条7.文本框8.分隔符 |二...
在状态栏中显示鼠标位置坐标
(1)在状态栏资源中添加一个窗格。实现的方法是打开MainFrm.cpp文件,找到静态数 组indicators的定义,在第一个数组元素ID_SEPARATOR后面增加一个新的数组元素,即 添加了一个新的窗格,为了表明这个窗格的用途,故命名为 ID_INDICATOR_MOUSE_POS。修改后的代码如下: static UINT indicators[] = { ID_SEPA
Qt学习之路19--主窗口QMainWindow之工具栏QToolBar、状态栏QStatusBar
工具栏存在的意义:
MFC对话框中的工具栏、状态栏设计小结
对网上的资料结合自己的实践的总结,由于大部分都是网上先辈们的经验,这里只是直接将内容拿来,格式优化一下更易读而已。对话框中建立工具栏的方法工具栏中包含了一组用于执行命令的按钮,每个按钮都用一个图标来表示。当单击某个按钮时,会产生一个相应的消息,对这个消息的处理就是按钮的功能实现。将菜单中常用的功能放置在工具栏中,这样可以方便用户操作,省去了在级联菜单中一层层查找菜单项的麻烦。1、工具栏类CToolB
MFC对话框程序添加状态栏动态显示时间,随窗口大小变化
新建MFC 对话框项目DlgStatusBar,选择基于对话框,选择Use Unicode libraries(否则运行前后界面风格会不同),接下来选择 Minimize box , Maximize box , 去掉About box 然后Finished 首先创建状态栏 首先在string table 里添加两个字串,ID分别为IDS_INDICATOR_MESSAGE 和I
JS 打开新窗口没有工具栏 地址栏,同时关闭当前窗口
  //弹出新窗口 window.open(url,"login","scrollbars=no,toolbar=no, menubar=no, location=no, status=no");          window.opener=null;   window.open("","_self");   window.close(); //关闭窗口 如果是编码整个URL,就用encodeURI(),若是只编码包含中文的那个参数name:var url="ActionServlet?name="+en
Qt 笔记:主窗口中的状态栏
状态栏的概念和意义 -状态栏是应用程序中输出简要信息的区域 -状态栏一般位于主窗口的最底部 -状态栏中的消息类型 ·实时消息,如:当前程序状态 ·永久消息,如:程序版本号,机构名称 ·进度消息,如:进度条提示,百分比提示 在Qt中提供与状态栏相关的类组件 -状态栏(QStatusBar) -任意组件(QWidget) // call memeber fucntion QSt...
文章热词 机器学习教程 Objective-C培训 交互设计视频教程 颜色模型 设计制作学习
相关热词 mysql关联查询两次本表 native底部 react extjs glyph 图标 关于大数据培训 关于云计算