标签:
引用using System.Runtime.InteropServices;
在窗体的全局模式下输入
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
在窗体或者容器的MouseDown事件输入
ReleaseCapture();
SendMessage(this.Handle, 0x0112, 0xF010 + 0x0002, 0);//最简单用法
标签:
原文地址:http://www.cnblogs.com/zhangruifeng/p/5744895.html