- 60 名前:デフォルトの名無しさん mailto:sage [2007/03/09(金) 17:27:17 ]
- Point lastPos;
private void timer1_Tick(object sender, EventArgs e){ Point current = System.Windows.Forms.Cursor.Position; if (this.Bounds.Contains(p)){ int dx = current.X - lastPos.X; int dy = current.Y - lastPos.Y; Point loc = this.Location; loc.Offset((int)((float)dx * 1.0f), (int)((float)dy * 1.0f)); this.Location = loc; } lastPos = current; this.Refresh(); } こんな感じ?C#だけど
|

|