جابه جایی فرم در سی شارپ
using System.Runtime.InteropServices;[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 Form1_MouseDown(object sender, MouseEventArgs e)pre>{ ReleaseCapture(); SendMessage(this.Handle.ToInt32(), WM_NCLBUTTONDOWN, 2, 0); }
+ نوشته شده در شنبه بیست و پنجم شهریور ۱۳۹۶ ساعت 15:42 توسط محسن
|