Solved

Save the screen to a file, how?

Posted on 1997-09-27
3
190 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now