delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback



Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi








Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (5)


How Can I Capture the Screen to a Image?Go to Romeo Lefter's websiteFormat this article printer-friendly!Bookmark function is only available for registered users!
Capturing Screen
Product:
Delphi all versions
Category:
Graphic
Skill Level:
Scoring:
Last Update:
04/24/2000
Search Keys:
delphi delphi3000 article borland vcl code-snippet Graphics DeviceContext Capture
Times Scored:
12
Visits:
7394
Uploader: Romeo Lefter
Company: Rombest Software
Reference: delphi3000
 
Question/Problem/Abstract:
How Can I Capture the Screen to a Image?
Answer:



Capture a screen to a bitmap can be very simple. Just copy the bellow function and put in your program.

function CaptureScreen:TBitmap;
var
  DC : HDC;
  ABitmap:TBitmap;
begin
  DC := GetDC (GetDesktopWindow);
  ABitmap:=TBitmap.Create;
  try
    ABitmap.Width  := GetDeviceCaps (DC, HORZRES);
    ABitmap.Height := GetDeviceCaps (DC, VERTRES);
    BitBlt(ABitmap.Canvas.Handle, 0, 0, ABitmap.Width,
           ABitmap.Height,DC, 0, 0, SRCCOPY);
  finally
    ReleaseDC (GetDesktopWindow, DC);
  end;
Result:=ABitmap;
end;





Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment
How to save the result to a file?
    Ben van Erp (Sep 28 2000 2:16PM)

How can i save the result of the function to a file?
Respond

RE: How to save the result to a file?
Daaron Dwyer (Oct 19 2000 4:11PM)

Just call the TBitmap's saveToFile method
Respond

How do I create TV application?
    Seçkin Başköy (Sep 13 2000 4:56PM)

I have a problem that my dad isnt know any english language. So my TV-Capture Card's software written in english. I want create a new TV applicaton in Turkish to my dad wants to use TV in my computer. Please help me for this. I have english but I cant use english very well. Thanks...
Respond

RE: How do I create TV application?
Bill Sorenses (Oct 15 2000 5:01PM)

I suggest you contact the manufacturer of your TV card. They may have guides on programming for the card.
Else you could simply work with the manufacturer to translate their program into Turkish.

Good luck.
Respond

RE: RE: How do I create TV application?
^CarpeDiem^ (Feb 2 2001 8:20AM)

I have created a nice application to take user defined screen shots with a transparent window.

http://www.Geocities.com/CarpeDiemIsrael/Captpage.htm

I'll give the source for free, on e-mail request
Respond














 
Sign up to consume product discounts for Bronze memberships !

read more


   


  Community Ad of
M. Kleiner
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)