Permalänk
Medlem

Delphi problem...

tjena, finns d nån inbyggd funktion i delphi för at ta screenshot (alstå när man trycker på en knapp sparas d ett screenshot i en bild eller nått) ?? nån som vet?

Visa signatur

Hacking is like sex, you get in and out fast, then you pray that you didn't leave anything that could be traced back to you

Permalänk
Medlem

procedure ScreenShot (Image : TBitmap);
var
DC : HDC;
begin
DC := GetDC (GetDesktopWindow);
try
Image.Width := GetDeviceCaps (DC, HORZRES);
Image.Height := GetDeviceCaps (DC, VERTRES);
BitBlt(Image.Canvas.Handle, 0, 0, Image.Width,
Image.Height,DC, 0, 0, SRCCOPY);
finally
ReleaseDC (GetDesktopWindow, DC);
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
ScreenShot(Image1.Picture.Bitmap);
end;

Visa signatur

www.filipsprogram.tk - lite freeware
"Delight, herregud. Talang är bara förnamnet."

Permalänk
Medlem

tusen tack

Visa signatur

Hacking is like sex, you get in and out fast, then you pray that you didn't leave anything that could be traced back to you

Permalänk
Hedersmedlem

Är GetDC, GetDeviceCaps, BitBlt och ReleaseDC Win-API eller Delphi?
(orkar inte kolla )

Visa signatur

Asus B550M-Plus / Ryzen 5800X / 48 GB 3200 MHz CL14 / Asus TUF 3080 OC / WD SN850 1 TB, Kingston NV1 2 TB + HDDs / Corsair RM650x / Acer XB271HU (1440p165) / LG C1 55"
Mobil: Moto G200

Permalänk
Medlem
Citat:

Ursprungligen inskrivet av Thomas
Är GetDC, GetDeviceCaps, BitBlt och ReleaseDC Win-API eller Delphi?
(orkar inte kolla )

Win-API

Visa signatur

flippy @ Quakenet