I'd like to control when a Delphi console window becomes visible at startup. At the moment I use the following code as the first thing I do to hide the console, do other stuff, then make it visible again
showWindow(GetConsoleWindow, SW_HIDE);
... do other stuff
showWindow(GetConsoleWindow, SW_NORMAL);
However, one can still see a flash of the initial console window before it is hidden by SW_HIDE. Is there another way to hide the console window before windows even attempts to make it visible at startup?
To provide further background information, the user experience I am after is that a console screen appears centered on the screen. I know how to center the console window but I still see a flash at startup before the window is centered. I'd like to have control over when the console becomes visible so that to a user the console window appears without any ghost of a window at startup.