Example #1
0
        /// <summary>
        ///     Enables or disables a window.
        /// </summary>
        /// <param name="hWnd"> The window to enable/disable. </param>
        /// <param name="enable"> true if the window should be enabled, false if it should be disabled. </param>
        /// <remarks>
        ///     <para>
        ///         Nothing happens if <paramref name="hWnd" /> is <see cref="IntPtr.Zero" />.
        ///     </para>
        /// </remarks>
        public static void EnableWindow(IntPtr hWnd, bool enable)
        {
            if (hWnd == IntPtr.Zero)
            {
                return;
            }

            WindowsWindow.EnableWindowInternal(hWnd, enable);
        }