/// <summary> /// Enable or disable input to a window. /// </summary> /// <param name="window">The window to affect.</param> /// <param name="enable">True to enable the window, false to disable it.</param> /// <returns>If the window was previously disabled, true, otherwise false.</returns> public static Boolean EnableWindow(Window window, Boolean enable) { WindowInteropHelper helper = new WindowInteropHelper(window); HandleRef handle = new HandleRef(window, helper.Handle); return(Win32Interop.EnableWindow(handle, enable)); }
/// <summary> /// Disable input to a window. /// </summary> /// <param name="window">The window to affect.</param> /// <returns>If the window was previously disabled, true, otherwise false.</returns> public static Boolean DisableWindow(Window window) { return(Win32Interop.EnableWindow(window, false)); }
/// <summary> /// Enable input to a window. /// </summary> /// <param name="window">The window to affect.</param> /// <returns>If the window was previously disabled, true, otherwise false.</returns> public static Boolean EnableWindow(Window window) { return(Win32Interop.EnableWindow(window, true)); }