Take a screenshot of specific area of a given window and save it to file

Ukończone Opublikowano May 3, 2012 Płatność przy odbiorze
Ukończone Płatność przy odbiorze

Implement in Borland Delphi a function (or a class) with the following interface:

Function TakeScreenshot(Window : THandle; TopLeftPoint : TPoint, BottomRightPoint : TPoint; Filename : String) : Integer;

The function takes a screenshot of a given window's canvas area (window's handle is given with the Window parameter). But instead of the entire canvas, only area between TopLeftPoint and BottomRightPoint. Parameter Filename defines the filename in which the screenshot file is saved. The file can be saved in any format, such as BMP or JPG.

The function returns a status code of 0 if everything worked OK, and an error code in a case of error.

For example:

p1.x := 0;

p1.y := 0;

p2.x := 100;

p2.y := 100;

TakeScreenshot(12345, p1, p2, 'c:\[url removed, login to view]');

This call would create a screenshot of a window whose handle is 12345, the screenshot would be only of the top left corner of the window canvas. The screenshot is saved to the given filename.

The code must work under Windows 7 and Windows Vista.

Delphi

Numer ID Projektu: #2737993

O projekcie

5 ofert Zdalny projekt Aktywny May 3, 2012

Przyznany użytkownikowi:

salmisoft

See private message.

$25 USD w ciągu 12 dni
(5 ocen)
3.7

5 freelancerów złożyło ofertę za $53 w tym projekcie

CodeAmbassador

See private message.

$100.3 USD w ciągu 12 dni
(30 Oceny)
6.1
Schura

See private message.

$30.6 USD w ciągu 12 dni
(7 Oceny)
3.5
bpm76

See private message.

$25.5 USD w ciągu 12 dni
(2 Oceny)
1.2
kinraygroup

See private message.

$85 USD w ciągu 12 dni
(0 Oceny)
0.0