QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: IronMan on May 31, 2020, 11:51:35 pm

Title: Black Window Pop-up when starting application
Post by: IronMan on May 31, 2020, 11:51:35 pm
I am trying to call another Windows application by using the SHELL command from within a QB64 application. It all works just fine with the exception of it displaying a BLACK WINDOW when application starts just before running the SHELL command.

Is there a way to not show or hide the default screen when a QB64 app first runs. It only display for a second, but because this small application is running another windows application using the SHELL command, it flashes the black window on the screen first.


Basically the code is:

_SCREENHIDE
SHELL _HIDE "PROGRAM.EXE"
END


Everything works perfect for what I'm needing to do except the black pop-up windows when the program starts.



Any help is appreciated.

Thank you.
Kent
Title: Re: Black Window Pop-up when starting application
Post by: RhoSigma on June 01, 2020, 04:40:30 am
Why do you keep asking same question again?
https://www.qb64.org/forum/index.php?topic=2406.msg116251#msg116251
Title: Re: Black Window Pop-up when starting application
Post by: TempodiBasic on June 01, 2020, 05:05:19 am
LOL
Quote
Why do you keep asking same question again?

seriously
Yes the suggestion of RhoSigma is right

https://www.qb64.org/forum/index.php?topic=2406.msg116262#msg116262 (https://www.qb64.org/forum/index.php?topic=2406.msg116262#msg116262)

see here my code on that track
Code: QB64: [Select]
  1. SHELL _DONTWAIT "notepad.exe"
  2. SCREEN _NEWIMAGE(600, 600, 32)
  3. CLS , _RGB(17, 194, 50, 255)
  4. PRINT "hello"
  5.  
  6.  
no starting black window before notepad appears on the screen on my old TOSHIBA i3 4GB Ram
Title: Re: Black Window Pop-up when starting application
Post by: IronMan on June 01, 2020, 08:35:42 am
Why do you keep asking same question again?
https://www.qb64.org/forum/index.php?topic=2406.msg116251#msg116251

Perhaps because I have failed yet to get it to work like I need it to. Am I missing something? Is this forum not the place where we share and ask for help? Perhaps I'm confused.....
Title: Re: Black Window Pop-up when starting application
Post by: SMcNeill on June 01, 2020, 11:28:55 am
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"
Title: Re: Black Window Pop-up when starting application
Post by: IronMan on June 01, 2020, 02:26:45 pm
WORKING!!!!  Thanks for all the help. I as using _SCREENHIDE instead of $SCREENHIDE.

Everything working great..

Thank you.
Kent