Printing from a dos program

I was wondering if any of you can help me with my problem. I have this really small DOS program (~40 kb) that I am running and it is based on Kramers' formula.

Now the thing is when you generate a graph in this program there is a message in the bottom right-hand corner that says "Press 'Print Screen' to print". I do this and it doesn't print.

So I thought I'd read up on it and I found that you need a program like DOS2USB or something like that. But when I installed it and pressed print screen it still didn't work. I definitely had the right printer selected.

Do you know how you might print something from a DOS program from windows XP???

Print screen puts the entire screen into the copy buffer. If you hit that button, go to something like paint or powerpoint and hit CTRL-V and the entire screen will show up. I don't know of a way in Windows to print only the active window. You can get a free program like Hover-Snap to do that.

Staff: Mentor

Have you tried running the program in the various compatibility modes?

You might have some kind of problem because there is no such thing as real dos system files in an emulated command window. If you run a dos program in windows xp, it's not true dos. It's an emulated dos and it uses dummy configuration files, so it may not be possible to set up dos to print correctly directly from the window (since that is something you had to set up in a sys file).

You'll probably want to use some print screen type utility. There are millions out there. Here's a freeware one if you want it (http://www.gadwin.com/download/ps_setup.exe" [Broken] to go to the webpage. (I haven't tested this program, I just googled for one and found one real quick for you)

You may well need the dos drivers for your printer. This may be nearly impossible to get. Go find yourself a old epson dot matrix.

lol. I remember those slow ass printers.

Cmd.exe is an emulated dos (look up command.exe) though. It doesn't load sys files. The sys files exist in windows xp, but only for show in case a program in dos tries to reference or make changes to the file for some reason. They are 100% fake. I read the microsoft resource page regarding it and I researched this before, I just don't remember the links.

Thanks for the advice guys. I will give that program a try BoredNL, but I don't have much hope. I have tried different compatibility modes, but they haven't worked either.

This program is really weird because it will ONLY operate in full screen mode. No matter what I do I can't make it load in a smaller window. I'm not sure if this would help with getting a screenshot, but who knows.

It might not work, because it might use a different screen buffer than other windows.

Ooh, I just thought of something.

Are you using an MS-Dos shortcut to run the program? If so, then this is the cause of your problem with it constantly maximizing. Right click on the file you are running and make sure "start maximized" is not selected.

If the screen capture program that I pointed you to doesn't work, there are plenty of other programs out there to try too.

Well, good luck. :)

Phil

-edit: oh one more thing. Does this program have a text output or is it graphical? Also, do you have to do anything in the program or is it just running and spitting out text? You could run it like this "program.exe >> file.txt", to get it to output to a text file. You would press CTRL + C to break out of the program once you think it's spit out the text you wanted it to.

Hey Big Guy
I have the same problem. I'm trying to copy waveforms from an old DOS QM program. I've done it in the past with no problems by using Alt + Printscreen and copying to MS Paint. However that was with Windows 2000. Now I'm trying in XP and cannot get anything to copy. So if you try W2k it may solve your problem.

Printscrn should send the entire screen to the clipboard, alt-printscrn sends the active window, it may be that a full-screen DOS program doesn't have an active window.

If printscr on it's own doesn't work, you can either try graphics packages with a screen capture button life irfanview/paintshop or as a last resort you can run the dos program under virtualPC. This lets you capture the virtualPC screen whatever is running under it, we use it for capturing screen shots of installation steps that you can't normally grab.

This program is really weird because it will ONLY operate in full screen mode. No matter what I do I can't make it load in a smaller window. I'm not sure if this would help with getting a screenshot, but who knows.

This happens in the command window when the DOS program reasigns certain interupts like timer. The Cmd (DOS) window can be put in suspend mode and made resizable by hitting Alt-Enter key combination. Suspend mode means you can not do anything with the DOS program. With the Cmd window in suspend you can now use the normal windows functions on it. Alt-PrintScreen should make a copy that you past into paint and print.

1. Hit PrintScreen, copy image to word processor or photo editor, print. This will copy the whole screen.
2. Hit Alt + PrintScreen, copy image to word processor or photo editor, print. This will copy just the current window.
3. Right click in window, choose Mark, select area to be printed with mouse, press Enter. Paste the copied text to a word processor or text editor and print.
4. Save results to file and print with the DOS print command. If you start your program with the command "myProgram -l 42", you can save it to a file with the command "myProgram -l 42 > foo.txt" and print it with "print foo.txt".
5. Print the result directly from DOS with redirection. If you start the program with "myProgram -l 42" you can print it with "myProgram -l 42 > lpt1".

In 4 and 5 you may need to send enough blank lines to the printer to make the last page come out.