I know nothing of Python and can't make out the images you linked to, but PowerShell can hide any window you can obtain the handle to if you use Add-Type
to Pinvoke the ShowWindow() function:
Add-Type @'
using System;
using System.Runtime.InteropServices;
public class API {
public enum SW : int {
Hide = 0,
Normal = 1,
ShowMinimized = 2,
Maximize = 3,
ShowNoActivate = 4,
Show = 5,
Minimize = 6,
ShowMinNoActive = 7,
ShowNA = 8,
Restore = 9,
Showdefault = 10,
Forceminimize = 11
}
[DllImport("user32.dll")]
public static extern int ShowWindow(IntPtr hwnd, SW nCmdShow);
}
'@
Copy, paste, and execute the above code in a PowerShell window (or script) and the window can then hide and show itself like so:
$ThisWindow = [System.Diagnostics.Process]::GetCurrentProcess().MainwindowHandle
[API]::ShowWindow($ThisWindow,'Hide')
sleep -Seconds 5
[API]::ShowWindow($ThisWindow,'Show')
The handles to other top-level windows can be obtained from Get-Process
or Pinvoking the FindWindow()
functions.