Nytro Posted November 17, 2010 Report Posted November 17, 2010 (edited) [Delphi] Screen Capture with parametersAuthor: zoom (cred)program ScreenShot;uses Windows, Graphics, Jpeg;procedure ScreenToFile(FileName: string; Quality: Word; Percent: Word);var Bmp: TBitmap; Jpg: TJpegImage;begin Bmp := TBitmap.Create; Jpg := TJpegImage.Create; try Bmp.Width := GetDeviceCaps(GetDc(0), 8) * Percent div 100; Bmp.Height := GetDeviceCaps(GetDc(0), 10) * Percent div 100; SetStretchBltMode(Bmp.Canvas.Handle, HALFTONE); StretchBlt(Bmp.Canvas.Handle, 0, 0, Bmp.Width, Bmp.Height, GetDc(0), 0, 0, GetDeviceCaps(GetDc(0), 8), GetDeviceCaps(GetDc(0), 10), SRCCOPY); Jpg.Assign(Bmp); Jpg.CompressionQuality := Quality; Jpg.SaveToFile(FileName); finally Jpg.free; Bmp.free; end;end;begin ScreenToFile('SHOT.JPG', 50, 70);end. Edited November 19, 2010 by Nytro Quote
mike_vio Posted November 18, 2010 Report Posted November 18, 2010 Misto, deja i-am facut proba. Quote
Paul4games Posted November 19, 2010 Report Posted November 19, 2010 Nu este facut de carbon el daor a facut copy/paste de pe http://www.ic0de.org/showthread.php?9879-SNIPPET-Screen-Capture-with-parameters. Quote
blackrunner1911 Posted November 22, 2010 Report Posted November 22, 2010 (edited) Toata stima pentru Nytro, delphi e cel mai tare PL , nu se poate decompila in totalitate ruleaza pe maoritatea OS, e destul de dificil, mi-as dori si eu sa stiu mai multe despre el dar ceva "Easy Guide" nu am gasit sau ceva coduri surse mai simple sa le i-au de exemplu si sa le dezvolt, poate ma puteti ajuta.Mi-as dori sa invat basicul in visual si pe urma sa fac mutatiile in vechiul borland delphi unde nici analisti av nu mai stiu cu ce se mananca... Edited November 22, 2010 by blackrunner1911 Quote