0
Answer

Move form with Mouse_Down

ghasem deh

ghasem deh

10y
570
1
hi ...
i use this code to move Form with Event Mouse_Down :

[DllImport("user32.dll")]
static extern int ReleaseCapture();
[DllImport("user32.dll", EntryPoint = "SendMessageA")]
static extern int SendMessage(int hwnd, int wMsg, int wParam, object lParam);
private const int WM_NCLBUTTONDOWN = 161;
.
.
.

private void button7_MouseDown(object sender, MouseEventArgs e)
{
ReleaseCapture();
SendMessage(this.Handle.ToInt32(), WM_NCLBUTTONDOWN, 2, 0);
}


But after Mouse_Up ... Error :

http://s5.picofile.com/file/8141136026/Untitl34reed.png