作者wa007123456 (大笨羊)
看板C_Sharp
標題Re: [問題] 東西從上方落下後消失要怎麼寫?
時間Thu Dec 31 19:29:44 2009
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Test
{
public partial class Form1 : Form
{
static Point v2 = new Point(50, 0);
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
pictureBox1.Location = v2;
v2.Y+=3;
if (v2.Y > 300) {
v2.Y = 0;
}
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
}
}
}
只是只能產生一個圖片@@
我想到要用List
但是 執行中好像加入PictureBox 會有問題 囧
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.228.108.246
推 cplusplus:會有什麼問題? 01/01 20:41
推 LAGURA77:我猜 會有頓頓的感覺 01/02 19:02