Belhard.Training.MutexDemo.Program.SetForegroundWindow C# (CSharp) Method

SetForegroundWindow() private static method

private static SetForegroundWindow ( IntPtr windowHandle ) : void
windowHandle System.IntPtr
return void
        private static void SetForegroundWindow(IntPtr windowHandle)
        {
            if (windowHandle == IntPtr.Zero) return;

            //Native.WINDOWPLACEMENT placement = Native.WINDOWPLACEMENT.Default;
            //if (Native.GetWindowPlacement(windowHandle, out placement))
            //{
            //    if (placement.ShowCmd == Native.ShowWindowCommands.Minimize)
            //    {
            //        Native.ShowWindow(windowHandle, Native.ShowWindowCommands.Restore);
            //    }
            //}

            Native.SetForegroundWindow(windowHandle);
        }