我同学给了我一个有三给类的代码,我不知道怎样组合它们才可以运行成功
////以下是三个类
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;namespace game
{
/// <summary>
/// frmts 的摘要说明。
/// </summary>
public class frmts : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public frmts()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent(); //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(248, 64);
this.label1.TabIndex = 0;
this.label1.Text = "贪吃蛇游戏,相信大家已经熟悉了,其中A为左,D为右,W为上,S为下,其它键按下依次为(暂停/继续)。--------编程:熊陆锦----------2006。10。14";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(136, 64);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "确定(&O)";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// frmts
//
this.AcceptButton = this.button1;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(256, 94);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmts";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "帮助:";
this.ResumeLayout(false); }
#endregion private void button1_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}/////////////
using System.Windows.Forms;namespace game
{
/// <summary>
/// frmsz 的摘要说明。
/// </summary>
public class frmsz : System.Windows.Forms.Form
{
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label lbldj;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblleft;
private System.Windows.Forms.Label lbldown;
private System.Windows.Forms.Label lblright;
private System.Windows.Forms.Label lblup;
private System.Windows.Forms.TextBox txtright;
private System.Windows.Forms.TextBox txtdown;
private System.Windows.Forms.TextBox txtup;
private System.Windows.Forms.TextBox txtleft;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
///////////////////
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace game
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class frmgame : System.Windows.Forms.Form
{
private System.Windows.Forms.Timer gametime;
private System.Windows.Forms.Panel pnlkj;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.ComponentModel.IContainer components;
////以下是三个类
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;namespace game
{
/// <summary>
/// frmts 的摘要说明。
/// </summary>
public class frmts : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public frmts()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent(); //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(248, 64);
this.label1.TabIndex = 0;
this.label1.Text = "贪吃蛇游戏,相信大家已经熟悉了,其中A为左,D为右,W为上,S为下,其它键按下依次为(暂停/继续)。--------编程:熊陆锦----------2006。10。14";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(136, 64);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "确定(&O)";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// frmts
//
this.AcceptButton = this.button1;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(256, 94);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmts";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "帮助:";
this.ResumeLayout(false); }
#endregion private void button1_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}/////////////
using System.Windows.Forms;namespace game
{
/// <summary>
/// frmsz 的摘要说明。
/// </summary>
public class frmsz : System.Windows.Forms.Form
{
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label lbldj;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblleft;
private System.Windows.Forms.Label lbldown;
private System.Windows.Forms.Label lblright;
private System.Windows.Forms.Label lblup;
private System.Windows.Forms.TextBox txtright;
private System.Windows.Forms.TextBox txtdown;
private System.Windows.Forms.TextBox txtup;
private System.Windows.Forms.TextBox txtleft;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
///////////////////
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace game
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class frmgame : System.Windows.Forms.Form
{
private System.Windows.Forms.Timer gametime;
private System.Windows.Forms.Panel pnlkj;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.ComponentModel.IContainer components;
解决方案 »
- Graphics.DrawImage画图,参数错误,费解!在线等!马上结贴
- 大侠@!如何写bindingsource.remove(?)里的参数 还有如何在绑定的textbox里面查询?!
- c#中,如何读取内存中的word二进制数据?
- 求个思路:如何实现表达式的 计算?
- 字符串转换问题,请各位帮忙!!!!
- treeview的问题,请高手帮忙!!
- 用C# + jmail收发邮件问题!
- DataGrid 的主从表显示,从表直接显示内容如何实现?
- SQlCommanderBuilder的用法SetAllValues
- 如何判断鼠标在窗体外的停留和移动
- C# timer1
- WinForm中,使用WebBrowser打开的某个页面具有多个form,如何提交第二个,第三个FORM
http://blog.csdn.net/chengking/archive/2005/11/06/524162.aspx
2,分少的BS.
3,要来了代码都不会看的.............
http://blog.csdn.net/red_angelx/archive/2006/09/29/1307040.aspx
http://blog.163.com/zd_cat/
lishuiqing.ys168.com