熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

簡單的圖片飄C#(Winform)

2013-11-13 09:56:15  來源: .NET編程 

  //個PictureBox    個Timer控件 然後把下面的復制上即可

  public partial class Form : Form
            {
                public int x = ;
                public int x = ;
                public int x = ;
                public int x = ;

  public Form()
                {
                    InitializeComponent();
                }

  private void Form_Load(object sender EventArgs e)
                {
                    thistimerEnabled = true;
                    thistimerEnabled = true;
                    thistimerEnabled = true;
                    thistimerEnabled = true;
                }

  private void timer_Tick(object sender EventArgs e)
                {
                    pictureBoxLocation = new Point(x);
                    x += ;
                    if (x >= thisSizeWidth)
                    {
                        x = ;
                    }
                }

  private void timer_Tick(object sender EventArgs e)
                {
                    pictureBoxLocation = new Point(x);
                    x += ;
                    if (x >= thisSizeWidth)
                    {
                        x = ;
                    }

  }

  private void timer_Tick(object sender EventArgs e)
                {
                    pictureBoxLocation = new Point(x);
                    x += ;
                    if (x >= thisSizeWidth)
                    {
                        x = ;
                    }
                }

  private void timer_Tick(object sender EventArgs e)
                {
                    pictureBoxLocation = new SystemDrawingPoint(x);
                    x += ;
                    if (x >= thisSizeWidth)
                    {
                        x = ;
                    }
                }
            }


From:http://tw.wingwit.com/Article/program/net/201311/12038.html
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.