我同学给了我一个有三给类的代码,我不知道怎样组合它们才可以运行成功
////以下是三个类
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;

解决方案 »

  1.   

    ChengKing的博客:
    http://blog.csdn.net/chengking/archive/2005/11/06/524162.aspx
      

  2.   

    1,要代码的BS.
    2,分少的BS.
    3,要来了代码都不会看的.............
      

  3.   

    楼主看来挺急的,看看下面这个吧,有程序设计说明和源码下载,趁着作者还放在那, 晚一点能不能下载就难说了
    http://blog.csdn.net/red_angelx/archive/2006/09/29/1307040.aspx
      

  4.   

    我的blog上也写了个,我也是新人大家切磋下
    http://blog.163.com/zd_cat/
      

  5.   

    到我的网络硬盘上面啊,也有个啊,还有注释的:
    lishuiqing.ys168.com