ممنونم دوست عزیز.
من از خاصیت Location برای جابجایی فرم استفاده نمیکنم از کد زیر برای این کار استفاده مکینم:
#region MoveForm
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
[DllImportAttribute("user32.dll")]
public static extern int SendMessage(IntPtr hWnd,
int Msg, int wParam, int lParam);
[DllImportAttribute("user32.dll")]
public static extern bool ReleaseCapture();
#endregion
private void Label_Or_OtherComponent_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
}
که این کد با روشی که شما گفتین جواب نداد!!!
میشه بگین چجوری با استفاده از Location میشه فرم رو جابجا کرد؟
ممنون میشم یه نمونه کد برام بذارین.
با تشکر...