当前位置: 编程技术>.net/c#/asp.net
c# Winform 全窗口拖动的代码
来源: 互联网 发布时间:2014-08-30
本文导语: c# winform 全窗口拖动的代码。 代码示例: [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, MouseEvent...
c# winform 全窗口拖动的代码。
代码示例:
[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);
}