Qbasicnews.com

Full Version: Running without a visible window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to have a (compiled) QB program run in the background (no DOS window)?
Well, I was curious, so I tried something.\
I put together a simple command line program that uses the showwindow api call to hide the console. When the shell returned, the QB program was still running. So yes, it's possible, but you need to call an api function to do it.

You could also potentially use FREECONSOLE(), but I'm not sure what effect that would have on the QB program. I'll try it later.
QB programs dont have windows. and they never run in the background. So no, there isnt.
Jonathan:
How do you use the showwindow api call?

I don't know anything about it. :oops:
Well, you might be able to use the "rundll32" command, from shell, to access the api functions. I'm honestly not sure if this would work, as I don't think rundll32 returns anything and you'll need a windows handle...
With that in mind, I can probably throw together either a command line program or a dll that finds the window handle and then hides it. Either option would allow you to selectively hide/show your dos box.

give me a yell on MSN if you want , (jsimpson@home-nets.biz) or respond here.

[edit]
I did it anyway: http://return.no-ip.org/archive/hidecon.zip
RST:

Ahh, your avatar... i had that game 10 years before and played it for ages... And finally the snowman always ate me... (I called that creature a snowman then).

If you want to write something for background, i think you should try XBasic. It is not easy to get used to it after QB, but it might be useful. RapidQ might solve this problem too.

XBasic is at www.xbasic.org if that site still exists, and RapidQ - i do not know. Search for it, i think it is still up somewhere.