- 868 名前:デフォルトの名無しさん mailto:sage [2009/03/21(土) 01:33:51 ]
- >>862
ピンポンの動きはよく分からんが、 こんな感じのものを作りたい? using System; using System.Drawing; using System.Windows.Forms; namespace circ { public class MainForm : Form { Timer timer; int x; int y; public MainForm() { Paint += new PaintEventHandler(MainForm_Paint); timer = new Timer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 500; timer.Enabled = true; } void MainForm_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawArc(Pens.Green, x, y, 10, 10, 0, 360); } void timer_Tick(object sender, EventArgs e) { x = (x + 10) % Width; y = (y + 20) % Height; Invalidate(); } } }
|

|