base.AutoScaleMode = AutoScaleMode.Font; 方法“InitializeComponent”内的代码由设计器生成,不应手动修改。请移除任何更改,然后尝试重新打开设计

反编译后的工程文件用VS2010打开后,在打开窗体时会出现一系列错误提示:

第一种情况:

“设计器无法处理第 152 行的代码: base.AutoScaleMode = AutoScaleMode.Font; 方法“InitializeComponent”内的代码由设计器生成,不应手动修改。请移除任何更改,然后尝试重新打开设计器”。

解决方法就是:对所有System.Windows.Forms.命名空间里面的控件需要全命名空间的声明,例如里面上图的base.AutoScaleMode = AutoScaleMode.Font;就要改成base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
目录 第一章. 概述 1 1.1概述 1 1.2意义 1 1.3任务 1 第二章. 系统的可行性研究与需求分析 2 2.1可行性研究 2 2.1.1经济可行性 2 2.1.2技术可行性 2 2.1.3操作可行性 2 2.2需求分析 2 2.2.1功能需求 2 2.2.2数据需求 3 2.2.3性能需求 3 2.2.4数据库逻辑结构 6 第三章. 系统的总体设计 7 3.1系统软件结构设计 7 3.1.1软件结构 7 3.2系统流程图 9 第四章. 系统的详细设计 10 4.1.1程序流程图 11 第五章. 系统的实现与调试 18 5.1应用系统的开发及测试 18 5.1.1系统首页 18 5.1.2用户登录及访问权限 19 5.1.3车次信息查询 21 5.1.4售票 21 5.15退票 22 结束语 23 致谢.....................................................................24 参考文献 25 附录A...............................................................................26附录B...............................................................................30 附录C............................................................................. 32 附录 登陆窗 #region Windows 窗体设计生成代码 private void InitializeComponent() { this.lblID = new System.Windows.Forms.Label(); this.lblPassWord = new System.Windows.Forms.Label(); this.cbSelect = new System.Windows.Forms.ComboBox(); this.lblSelect = new System.Windows.Forms.Label(); this.txtID = new System.Windows.Forms.TextBox(); this.txtPassWord = new System.Windows.Forms.TextBox(); this.btnCancel = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.skinEngine1 = new Sunisoft.IrisSkin.SkinEngine(((System.ComponentModel.Component)(this))); this.btnEnter = new System.Windows.Forms.Button(); this.SuspendLayout(); // LoginForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(322, 312); this.Controls.Add(this.label1); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnEnter); this.Controls.Add(this.txtPassWord); this.Controls.Add(this.txtID); this.Controls.Add(this.lblSelect); this.Controls.Add(this.cbSelect); this.Controls.Add(this.lblPassWord); this.Controls.Add(this.lblID); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.MaximumSize = new System.Drawing.Size(332, 348); this.MinimumSize = new System.Drawing.Size(332, 348); this.Name = "LoginForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "登录界面"; this.Load += new System.EventHandler(this.Login_Load); this.ResumeLayout(false); this.PerformLayout(); } } } 附录B 主界面 namespace TicketMana { partial class SellerForm { /// /// 必需的设计变量。 /// private System.ComponentModel.IContainer components = null; namespace TicketMana { partial class SellTicketForm { /// /// 必需的设计变量。 /// private System.ComponentModel.IContainer components = null; /// /// 清理所有正在使用的资源。 /// /// 如果应释放托管资源,为 true;否则为 false。
using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace 高温摩擦试验机2 { public partial class Form1 : Form { public static double skw = 10.1; Form form2 = new Form2(); // 创建新窗体实例 Form form3 = new Form3(); // 创建新窗体实例 Form form4 = new Form4(); // 创建新窗体实例 public Form1() { InitializeComponent(); form2.Width = 1770; form2.Height = 968; form2.Left = 150; form2.Top = 50; form3.Width = 1770; form3.Height = 968; form3.Left = 150; form3.Top = 50; } //private void Size() //{ // Form form3 = new Form3(); // 创建新窗体实例 // form3.Width = this.Width; // form3.Height = this.Height; // form3.Left = this.Left; // form3.Top = this.Top; // OpenForm(form3); //} private void Form1_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; this.AutoScaleMode = AutoScaleMode.Font; } private void Button1_Click(object sender, EventArgs e) { OpenForm(form2); //OpenForm(new Form2()); Showbar(sender as Button); } private void Button2_Click(object sender, EventArgs e) { // Form form3 = new Form3(); // 创建新窗体实例 // //Form form3 = new Form3(); // 创建新窗体实例 // form3.Width = this.Width; // form3.Height = this.Height; // form3.Left = this.Left; // form3.Top = this.Top; OpenForm(form3); //Size(); Showbar(sender as Button); } private void Button3_Click(object sender, EventArgs e) { OpenForm(new Form4()); Showbar(sender as Button); } private void OpenFor(Form frm) { frm.Show(); } private void OpenForm(Form frm) { frm.TopLevel = false; frm.TopMost = false; this.Panela .Controls.Clear(); this.Panela .Controls.Add(frm); frm.Show(); } private void Showbar(Button btn) { this.panel3.Location = new Point(btn.Location.X+13, btn.Location.Y+24); } } }为什么form3显示的和我在设计设计的不一样
07-12

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值