Belhard.Training.MutexDemo.Native.SetForegroundWindow C# (CSharp) 메소드

SetForegroundWindow() 개인적인 메소드

private SetForegroundWindow ( IntPtr hWnd ) : bool
hWnd System.IntPtr
리턴 bool
        internal static extern bool SetForegroundWindow(IntPtr hWnd);

Usage Example

예제 #1
0
파일: Program.cs 프로젝트: war-man/Training
        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);
        }