现在的位置: 首页 > 综合 > 正文

VS2005的窗体设计器中Bug

2013年03月28日 ⁄ 综合 ⁄ 共 568字 ⁄ 字号 评论关闭

  今天给我的一个工程的主窗体添加一个NotifyIcon,然后试运行,发现窗体内容都没有了。当时我就傻了,汗。Check Out原来的工程,发现在设计器生成的代码中少了:

            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.dockPanel1);
            this.Controls.Add(this.statusStrip1);
            this.Controls.Add(this.toolStripContainer1);
            this.Controls.Add(this.menuStrip1);
            this.IsMdiContainer = true;
            this.MainMenuStrip = this.menuStrip1;
            this.Name = "MainForm";
            this.Load += new System.EventHandler(this.MainForm_Load); 

晕了VS竟然给我删除了。最后我加上这段代码就没事了,这是不是它的一个Bug?

抱歉!评论已关闭.