首页 > 技术文章 > 锁定窗口,禁止更新的win32函数

xiaochun126 2015-12-15 09:54 原文

[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);

推荐阅读