Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TForm1.CaptureScreenShot(acapture: TBitMap);
var
c: TCanvas;
r: TRect;
begin
c:= TCanvas.Create;
c.Handle:= GetWindowDC (GetDesktopWindow);
try
r:= Rect(0,0,screen.width,screen.height);
acapture.Width:=screen.Width;
acapture.Height:=screen.Height;
acapture.Canvas.CopyRect(r, c, r);
finally
ReleaseDC(0, c.handle);
c.Free;
end;
end;
procedure TForm1.CaptureScreenShotJPEG(ajpeg:TJPEGImage);
var
abmp:TBitmap;
begin
abmp:=TBitmap.Create;
try
CaptureScreenShot(abmp);
ajpeg.Assign(abmp);
finally
abmp.Free;
end;
end;
procedure TForm1.btnStartCaptureClick(Sender: TObject);
var
ajpeg:TJPEGImage;
begin
ajpeg:=TJPEGImage.Create;
try
CaptureScreenShotJPEG(ajpeg);
if SavePictureDialog1.Execute then
ajpeg.SaveToFile(SavePictureDialog1.Filename);
finally
ajpeg.Free;
end;
end;
r:= Rect(0,0,screen.width,screen.height);
r := Rect(screen.monitors[0].width+1,
0,
screen.monitors[0].width+screen.monitors[1].width,
// screen.width may work for 'Right'?
screen.monitors[1].height);