You can do anything with window by using WinAPI. But you have to get window handle to do it.
In usual .NET application you can get them by this way:
var handle Process.GetCurrentProcess().MainWindowHandle
But it doesn’t work in unity.
So, i use another way to get the handle. I enumerate all windows by function EnumWindowsProc
and i get process id of each window by GetWindowThreadProcessId. When i find window with pid, that equals to pid of unity i can manipulate by unity window. Resize, move, minimize, etc.
To minimize window you can use ShowWindow function.