First, there's no such thing as a definitive "main window". You're probably talking about "owner-less top level window", which is usually called "main window" if an application only has one of them.
Basically, first try a FindWindow(NULL, windowTitle) to get its HWND and then use that one to either ShowWindow(hWnd, SW_HIDE) or MoveWindow(hWnd, &someRectOffTheScreen) or SetWindowPos(hWnd, &someRectOffTheScreen, someOtherMagicFlagsToKeepItReallyHidden) or maybe all of them!
But none of those can guarantee that the app doesn't bring itself back in a timed loop or something.