VB.NET質問スレ (Part20)
■ このスレッドは過去ログ倉庫に格納されています
0060デフォルトの名無しさん
2007/03/09(金) 17:27:17private 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#だけど
■ このスレッドは過去ログ倉庫に格納されています