hi
i need some help with doing screen dumps or print screens in turbo pascal. when i press the print screen button whilst my program is running and then go and paste it in word, powerpoint or paint, all that pastes is the text and boxes i have created but on a white background.also when it is pasted, all the text and boxes are distorted and are in no way a resemblance of what i see when i run my program. i would like to know how to get a print screen with a black background and have everything pasted exactly how it is in my program. any help appriciated.
Dani AI
Generated
Two practical ways to get faithful screenshots from a Turbo Pascal program: capture the pixels from outside the DOS session (host-based screenshot) or capture and save the pixels from inside the program.
Host-based capture (recommended): run the program in a windowed DOS environment (for example, DOSBox or a VM) and use a modern screen-capture tool (Windows Snipping Tool / Snip & Sketch, ShareX, macOS screenshot, etc.) to save a PNG. Insert the saved PNG into Word or PowerPoint rather than pasting directly from the clipboard — Office can reinterpret clipboard formats (EMF/WMF vs bitmap) and that often causes the font/spacing distortions described by . If pasting directly is unavoidable, use Paste Special -> Bitmap or paste first into an image editor (Paint) and save the file before inserting.
In-program capture: for graphics-mode programs that use the Graph unit, grab the onscreen rectangle and write it to a BMP/PNG file. For text-mode UIs, read the text-mode video buffer and render those character cells into a bitmap and save that file. Small Turbo Pascal libraries and examples exist that perform exactly those steps and produce pixel‑accurate images with a solid black background, avoiding OS clipboard quirks.
Troubleshooting notes: keep the program in a standard VGA/text mode (avoid custom font drivers), prefer lossless formats (PNG) to prevent artifacts, and invert the image in an editor if the background needs changing. Credit to for pointing toward a windowed capture approach and to for the clear symptom description.
abdullah 0 Newbie Poster
Try using the <alt>+<Enter> keystroke to get the dos-shell windowed (instead of full-screen), and then use the <alt>+<print_screen> keystroke to grab the pascal window only. From there, you can paste it into you word processor.
If you like, you can also press <alt>+<space> to get the system menu, choose 'properties' and select a screen font that is best suited for the documentation work.
what we've found is that the black screens waste ink, esp where there are a lot of screen shots, so you may want to paste the image into a graphic editor (something simple like microsoft photo editor), and invert the black screens to white screens.
alternatively, you can just change the black screens in your application using:
uses crt;
begin
...
textattr:=$70; clrscr;
end. hope that helps.. :) Abdullah
hi
i need some help with doing screen dumps or print screens in turbo pascal. when i press the print screen button whilst my program is running and then go and paste it in word, powerpoint or paint, all that pastes is the text and boxes i have created but on a white background.also when it is pasted, all the text and boxes are distorted and are in no way a resemblance of what i see when i run my program. i would like to know how to get a print screen with a black background and have everything pasted exactly how it is in my program. any help appriciated.
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.