336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

public Point ptRect = new Point(0, 0);

private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{

      ptRect.X = e.X;
      ptRect.Y = e.Y;

}

 private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{

      if(e.Button == MouseButtons.Left)
      {

          Point pt = new Point(this.Location.X + e.X - ptRect.X,
          this.Location.Y + e.Y - ptRect.Y);
          this.Location = pt;
      }

}

출처:데브피아
http://www.devpia.com/MAEUL/Contents/Detail.aspx?BoardID=17&MAEULNo=8&no=19223&ref=19223

Posted by shunman
,