[DllImport("user32.dll", EntryPoint = "LockWindowUpdate", SetLastError = true,
ExactSpelling = true, CharSet = CharSet.Auto,CallingConvention = CallingConvention.StdCall)]
private static extern bool LockWindow(IntPtr hWndLock);
锁定
LockWindow(this.Handle);
释放
LockWindow(IntPtr.Zero);