[KBM] move interop methods to dedicated class (#10958)

This commit is contained in:
Enrico Giordani
2021-04-26 16:14:59 -07:00
committed by GitHub
parent a8c99e9513
commit aa51f81bb8
2 changed files with 14 additions and 16 deletions

View File

@@ -13,5 +13,16 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
{
[DllImport("user32.dll")]
public static extern bool AllowSetForegroundWindow(int dwProcessId);
public const int SWRESTORE = 9;
[System.Runtime.InteropServices.DllImport("User32.dll")]
public static extern bool SetForegroundWindow(IntPtr handle);
[System.Runtime.InteropServices.DllImport("User32.dll")]
public static extern bool ShowWindow(IntPtr handle, int nCmdShow);
[System.Runtime.InteropServices.DllImport("User32.dll")]
public static extern bool IsIconic(IntPtr handle);
}
}