C#飞机大战(注释解释)

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 飞机大战
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

    //随机颜色
    Random sj = new Random();//属性的添加
    //游戏界面
    Panel gm = new Panel();

    //飞机盒子创建
    PictureBox feijihezi = new PictureBox();
    //爆炸效果图
    //PictureBox baozha = new PictureBox();

    private void Form2_Load(object sender, EventArgs e)
    {
        //设置背景图片为透明颜色
        //this.BackColor = Color.Transparent;
        //this.Font = new Font("",50);//字体大小
        //this.AutoSize = true;//字体大小自适应
        //图片lashen
        //this.SizeMode = PictureBoxSizeMode.StretchImage;
        //this.Location = new Point(0,0);//相对位置
        //this.Size=new Size();
        this.BackColor = Color.Pink;
        this.Size = new Size(1200,650);
        //this.Location = new Point(this.Left/2,this.Top/2);
        //把页面放中间
        this.Location = new Point(Screen.PrimaryScreen.Bounds.Width/2 - this.Width/2, Screen.PrimaryScreen.Bounds.Height/2 - this.Height/2);
        //this.Left = Screen.PrimaryScreen.Bounds.Width-this.Width;
        //this.Top = Screen.PrimaryScreen.Bounds.Height-this.Height;

        //创建一个游戏页面
        //Panel gm

你可能感兴趣的:(C#飞机大战(注释解释))