Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Save the screen to a file, how?

Posted on 1997-09-27
3
196 Views
Last Modified: 2010-04-04
Instead of printing the text and picture to printer
in the run time, how can I save them to a file in Word
or some other packedges so that I can print them out
from Word or the other packedges?
0
Comment
Question by:zhuhail
3 Comments
 
LVL 4

Accepted Solution

by:
erajoj earned 50 total points
ID: 1346362
I'm shooting in the dark here, since your question is slightly
ambiguous, however:
If you're just going to capture the screen from time to time,
use the "Print Scrn" button on the keyboard to get the whole screen or Alt+"Print Scrn" to get the window that currently has
the focus. Then just paste the image into Word.
No real use in doing it programmatically, unless you intend to;
either do it more often, or if it has to, for some reason, be
integrated into an application.

/// John

0
 

Expert Comment

by:Daveyboy
ID: 1346363
To start I concur with John about the use of such an appliaction But, if you really do need to do this then i would recomend One of two Functions that I have used before.
1: CopyRect.{This will allow you to copy a rectangle of a given canvas to another rectangle on another Canvas}.  the Code is easy to create:  Simply create a Bitmap i.e MyBit := TBitmap.create then use copyrect to create a copy of the screen to you Bitmap i.e.
CopyRect(Dest: TRect; Canvas: TCanvas; Source: TRect);
CopyRect(Trect(Bitmap.left,Bitmap.right etc.),Screen,Trect(0,0,Screen.width,Screen.height));

then just do a MyBit.savetofile('Filename');

Using Copyrect is the easiest but a little Slow
Try using the BitBlt function if you need to do this faster

////dave
0
 

Author Comment

by:zhuhail
ID: 1346364
Thanks to John and Dave.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 171
drawing animated level bar based on numbers 3 104
creating threads in delphi 1 132
Firemonkey webbrowser scrollbars ? 1 50
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question