Smile Screen
Implemented Screenshot possiblity for AROS, works very nice. Also found a source, how to make a screenshot
without the windows, the application.Minimize and Restore was long time implemented already but I never tried.
so here the source to create a screenshot:
procedure TForm1.Button1Click(Sender: TObject); var MyBitmap: TBitmap; ScreenDC: HDC; WrkJpg: TJpegImage; begin Application.Minimize; Application.ProcessMessages; Sleep(32); MyBitmap := TBitmap.Create; ScreenDC := GetDC(0); MyBitmap.LoadFromDevice(ScreenDC); Application.Restore; Application.BringToFront; WrkJpg := TJpegImage.Create; try WrkJpg.CompressionQuality := 80; WrkJpg.Assign(MyBitmap); WrkJpg.SaveToFile('test.jpg'); finally FreeAndNil(WrkJpg); end; ReleaseDC(0, ScreenDC); FreeAndNil(MyBitmap); end;
Schreibe einen Kommentar