NativeMethods.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System; 6 using System.Runtime.InteropServices; 7 8 namespace Microsoft.PowerToys.Settings.UI.Library.Utilities 9 { 10 internal static class NativeMethods 11 { 12 [DllImport("user32.dll")] 13 public static extern bool AllowSetForegroundWindow(int dwProcessId); 14 15 public const int SWRESTORE = 9; 16 17 [System.Runtime.InteropServices.DllImport("User32.dll")] 18 public static extern bool SetForegroundWindow(IntPtr handle); 19 20 [System.Runtime.InteropServices.DllImport("User32.dll")] 21 public static extern bool ShowWindow(IntPtr handle, int nCmdShow); 22 23 [System.Runtime.InteropServices.DllImport("User32.dll")] 24 public static extern bool IsIconic(IntPtr handle); 25 } 26 }