If I were to guess, I'd say your second program is the one creating that initial black window as it loads.
If the program you're SHELLing to is written in QB64, add an command line option to have it hide itself upon startup.
In your second program, which you'll shell to, use something like this:
$SCREENHIDE
IF COMMAND$ <> "-H" THEN_SCREENSHOW
Then, in your program which calls the shell, call it with:
SHELL_HIDE "PROGRAM.EXE -H"