How can I print from a DOS program in Windows XP?

In summary, Philip is trying to run a small DOS program that is based on Kramers' formula and when he prints it, there is a message that says "Press 'Print Screen' to print". He found out that he needed a program like DOS2USB or something like that, but when he installed it and tried to print with print screen, it still didn't work. He tried running the program in different compatibility modes, but they all failed. He also tried running the program in an MS-Dos shortcut, but that didn't work. He then tried using a screen capture program, but that also didn't work. He is out of options and is looking for advice.
  • #1
big man
254
1
Hey guys,

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?

Any advice would be greatly appreciated :)
 
Computer science news on Phys.org
  • #2
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.
 
  • #3
Yeah unfortunately I tried the ctrl+v approach and nothing happened.

In paint and photoshop you can't paste it and in Word when you paste you just get several lines of square symbols.

This program can only be maximised fully or minimised fully. You can't get it so that it is a small window.

Thanks for replying though
 
  • #4
FredGarvin said:
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.

Alt-PrintScreen works for me.
 
  • #5
Get a photo editor with a screen cap utility or use the drop-down menu at the top-right of the dos window to select all and copy.
 
  • #6
hmm..

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" to go to the webpage. (I haven't tested this program, I just googled for one and found one real quick for you)

Philip
 
Last edited by a moderator:
  • #7
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.
 
  • #8
Integral said:
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.
 
Last edited:
  • #9
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.
 
  • #10
Be sure to let us know if it works. :)

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.
 
Last edited:
  • #11
DOS Printscreen

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.

Javlin
 
  • #12
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 let's 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.
 
  • #13
big man said:
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.
 
  • #14
There are lots of ways. Off the top of my head:

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.
 

What is a DOS program?

A DOS program is a software application that runs on a computer using the Disk Operating System (DOS) operating system. DOS was the primary operating system used on personal computers before the development of Windows.

How do I print from a DOS program?

To print from a DOS program, you will need to connect a printer to your computer and ensure that it is properly configured. Then, you can use the print command within the DOS program to send the document to the printer.

Why is my DOS program not printing?

There could be several reasons why your DOS program is not printing. First, make sure that your printer is properly connected and turned on. Then, check the printer settings within the DOS program to ensure that the correct printer is selected. If the issue persists, try restarting your computer or troubleshooting the printer itself.

Can I print to a modern printer from a DOS program?

Yes, it is possible to print to a modern printer from a DOS program. However, you may need to use a special software or adapter to connect the printer to your computer. Additionally, you may need to adjust the printer settings within the DOS program to ensure compatibility.

Is it possible to print in color from a DOS program?

It is possible to print in color from a DOS program, but it depends on the capabilities of the printer you are using. If your printer is a color printer, you should be able to print in color from a DOS program. However, if your printer only supports black and white printing, then you will not be able to print in color from a DOS program.

Similar threads

  • Programming and Computer Science
Replies
1
Views
658
  • Computing and Technology
Replies
5
Views
1K
  • Computing and Technology
Replies
1
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
  • Computing and Technology
Replies
2
Views
1K
  • Programming and Computer Science
Replies
19
Views
3K
  • Materials and Chemical Engineering
Replies
10
Views
3K
  • Computing and Technology
Replies
18
Views
2K
Replies
3
Views
2K
  • Programming and Computer Science
2
Replies
43
Views
2K
Back
Top