コード例 #1
0
        /// <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));
        }
コード例 #2
0
 /// <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));
 }
コード例 #3
0
 /// <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));
 }