复制代码 代码如下:
[dllimport("user32.dll")]
public static extern bool releasecapture();
[dllimport("user32.dll")]
public static extern bool sendmessage(intptr hwnd, int wmsg, int wparam, int lparam);
private void frmmain_mousedown(object sender, mouseeventargs e)
{
releasecapture();
sendmessage(this.handle, 0x0112, 0xf012, 0);
}