我有这个错误:
错误 1“johny.Form1”不包含“Form1_Load”的定义,并且找不到接受“johny.Form1”类型的第一个参数的扩展方法“Form1_Load”(您是否缺少 using 指令或程序集引用?)
这是表单设计器的代码:
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(456, 411);
this.Controls.Add(this.l6);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
错误来自这一行:
this.Load += new System.EventHandler(this.Form1_Load);