Qbasicnews.com
colorful(l?) DOS - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html)
+--- Thread: colorful(l?) DOS (/thread-174.html)



colorful(l?) DOS - banAnnA - 02-08-2003

I found out that if you run a .bas-file which colors your screen, something like:
Code:
color 2,4 'or anything else, doesn't matter...
print "I like colors, you don't"
end
When you close QB, DOS remains in the colors you just runned. I like that. Problem is, when you make it into an .exe file, DOS doesn't take over the colors anymore. So it isn't possible to get a qb programm (or batchfile which starts it up.....) into my autoexec, and have a colorfull screen.
Another option would be start qb, but I don't think it's possible to open a .bas file, execute it, and end QB in a dos batchfile.
Maybe anybody knows a way to get your black and white (gray) screen into a red and blue one?


colorful(l?) DOS - na_th_an - 02-08-2003

* To run make QB run a BAS, then EXIT in a batch file:

Code:
qb /run filename.bas

* The file has to be like this:

Code:
COLOR 14, 1: CLS: SYSTEM

Anyhow, I don't know why you say that the colours don't remain on screen when you compile. I tested the code above compiled, and the colours remain on screen.

Putting this on AUTOEXEC.BAT won't work if you are using windows, as it opens a new window everytime you click on MSDOS icon.


colorful(l?) DOS - Agamemnus - 02-08-2003

autoexec is starts before Windows98. He could shell to it. from the bat file.. I think.


great! - banAnnA - 02-09-2003

Thanks!
I'll try it as soon as possible (That's today I think) and let you know if it works.
I think setting such a batch file into my autoexec isn't going to be a problem. I do have windows 95 but I got doskey into it also....and that worked.....


colorful(l?) DOS - na_th_an - 02-09-2003

Having doskey isn't the same thing as doskey is a TSR which stays in memory. The program which changes the screen colors just does that, then ends. So windows is started, the screen is clear 'cause the video mode is changed and the colours are lost. When you open a dos BOX, the screen mode is set again, so it will remain black with white characters.

You can edit your shortcut to MSDOS to call the program everytime you open a dos box, though.


Well, TSRs don't stay in memory either once Windows loads. - Glenn - 02-09-2003

Windows just loads the TSR again when you open a DOS window. But I'm surprised windows doesn't just run his autoexec again too, reproducing his color effect.


colorful(l?) DOS - na_th_an - 02-09-2003

I think that windows just runs some kind of configuration file, name AUTOEXEC.DOS or something like that, but I'm not sure.

Definitely, calling that "colour changer" in AUTOEXEC.BAT won't work.


colorful(l?) DOS - Neo - 02-10-2003

Nope, that's true. I guess you'll have to go to the BAT-Commands Smile


mmmmm.... - banAnnA - 02-12-2003

So, that's the way it works. I just looked up for "TSR" , so now I know that it means 'terminate and stay resident'. I learn new things every day.
Indeed, it's true that it doesn't work. Right now, I changed the autoexec in such a way that windows didn't start automaticly anymore. But that will be all right. I'll look at the options when starting a dos dialog box, but I think that maybe you wouldn't need a programm at all to change colors, and it's possible to change it in a menu, just as font size, and other things.
Another option is starting the computer in DOS. Then, when starting windows, the dialog box will disappear from the taskbar.....
I'll keep being optimistic