用lanbel移动 FormBorderstyle为None属性窗体的移动
我把窗体FormBorderstyle属性设为了None,这样的话,窗体就移动不了了,所以想用一个Label来控制这个窗体的移动,要怎么弄,谁给个例子啊,以前在VB里看到过,不过忘了,现在刚接触这个
[DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParan); public const int HTCAPTION = 2; public const int WM_SYSCOMMAND = 0x112; public const int SC_MOVE = 0xf010;添加mousDown事件调用
private void Form_MouseDown(object sender, MouseEventArgs e) { ReleaseCapture(); SendMessage(base.Handle, 0x112, 0xf012, 0); }