Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[DELPHI] Screen Capture

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Wed Feb 27, 2008 6:11 am    Post subject: [DELPHI] Screen Capture Reply with quote

Screen capturing is pretty easily done with delphi using the TCanvas and TBitmap objects.

1) open delphi

2) create a new console application (File->New->Other..., Console Application)

3) erase/delete all the code which is on the code sheet

4) add this code there:

Code:
program Screencapture;

uses
  Windows,
  Graphics,
  Forms,
  Classes;

var
 Canvas: TCanvas;
 Picture: TBitmap;
begin
 // Creating the TCanvas object
 Canvas := TCanvas.Create;

 // Attaching the handle to the desktop
 Canvas.Handle := GetDC( 0 );

 // Creating the TBitmap object
 Picture := TBitmap.Create;

 // Setting the picture size
 Picture.Width := Screen.Width;
 Picture.Height := Screen.Height;

 // Copying the desktop into the Picture-object
 Picture.Canvas.CopyRect( RECT( 0,0,Screen.Width,Screen.Height ), Canvas, RECT( 0,0,Screen.Width,Screen.Height ) );

 // Releasing the desktop handle
 ReleaseDC( 0, Canvas.Handle );

 // Releasing/freeing the canvas
 Canvas.Free;

 // Saving the picture
 Picture.SaveToFile( 'screen.bmp' );

 // Releasing/freeing the picture
 Picture.Free;
end.


@Flamers and especially holyblah, this code I did not copy from any website, I wrote it my self.

_________________
Back to top
View user's profile Send private message
jongwee
Moderator
Reputation: 0

Joined: 28 Jun 2006
Posts: 1388
Location: Singapore

PostPosted: Wed Feb 27, 2008 6:13 am    Post subject: Reply with quote

Will you ever stop posting such things? People know how to google 'em. Gosh, I can just create a new project and copy paste the function I googled and say I wrote it myself. Ironic, eh?
_________________
Back to top
View user's profile Send private message MSN Messenger
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Wed Feb 27, 2008 6:17 am    Post subject: Reply with quote

only thing is i wrote this one myself it has not been found on any website. I googled this myself and found some stuff like this but they were much more complicated and decided to make one myself. try find this exact same code on the web, I can promise you wont.
_________________
Back to top
View user's profile Send private message
jongwee
Moderator
Reputation: 0

Joined: 28 Jun 2006
Posts: 1388
Location: Singapore

PostPosted: Wed Feb 27, 2008 7:28 am    Post subject: Reply with quote

Lol by changing names of variables? Or by putting moar comments??!!

BTW: Why a console app?

_________________
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Feb 27, 2008 7:49 am    Post subject: Reply with quote

jongwee wrote:
Lol by changing names of variables? Or by putting moar comments??!!

BTW: Why a console app?


Agreed as this has been done before by others in this section. (Stealing code by changing vars and doing minor changes to make it look different.)

Similar code to this:
http://www.delphifaq.com/faq/f389.shtml
http://www.delphi3000.com/articles/article_511.asp?SK=
http://www.delphipraxis.net/post20989.html
http://www.sysman.ru/index.php?showtopic=7170

(Mind you I did say similar.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Wed Feb 27, 2008 8:12 am    Post subject: Reply with quote

Wiccaan wrote:
jongwee wrote:
Lol by changing names of variables? Or by putting moar comments??!!

BTW: Why a console app?


Agreed as this has been done before by others in this section. (Stealing code by changing vars and doing minor changes to make it look different.)

Similar code to this:
http://www.delphifaq.com/faq/f389.shtml
http://www.delphi3000.com/articles/article_511.asp?SK=
http://www.delphipraxis.net/post20989.html
http://www.sysman.ru/index.php?showtopic=7170

(Mind you I did say similar.)

yes similar I said myself too I have found similar ones, but this has been written by me from start to beginning, no changes made to someother script.

_________________
Back to top
View user's profile Send private message
colo
Expert Cheater
Reputation: 1

Joined: 09 Apr 2005
Posts: 111

PostPosted: Wed Feb 27, 2008 8:57 am    Post subject: Re: [DELPHI] Screen Capture Reply with quote

skyllakarean wrote:

@Flamers and especially holyblah, this code I did not copy from any website, I wrote it my self.


rofl Razz

you had read a lot and had compressed some everything : P
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Wed Feb 27, 2008 9:10 am    Post subject: Re: [DELPHI] Screen Capture Reply with quote

skyllakarean wrote:
@Flamers and especially holyblah, this code I did not copy from any website, I wrote it my self.

As wiccaan said, similar code could be found in Google.

Not giving credits is like stealing the work of others.

Tip:
You can use the picture canvas instead of a new one's.
Back to top
View user's profile Send private message
malfunction
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Jan 2007
Posts: 1015
Location: http://www.behindthecorner.com/

PostPosted: Wed Feb 27, 2008 10:18 am    Post subject: Re: [DELPHI] Screen Capture Reply with quote

HolyBlah wrote:
skyllakarean wrote:
@Flamers and especially holyblah, this code I did not copy from any website, I wrote it my self.

As wiccaan said, similar code could be found in Google.

Not giving credits is like stealing the work of others.

Tip:
You can use the picture canvas instead of a new one's.

yes similar but not this one Surprised

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites