I'm using Delphi 11 and I'm trying to get the EdgeBrowser.CapturePreview to save to
stream and use later.
In the first example, the file saves correctly. From what I can see the .CapturePreview will save to a file or a stream. But, CapturePreview does not appear to Capture to a stream. Any suggestions?
uses Vcl.Edge;
procedure TFormMain.MenuSaveScreenShotClick(Sender: TObject);
begin
//This sample works well and saves a file.
if SaveDialog1.Execute then EdgeBrowser1.CapturePreview(SaveDialog1.FileName);
end;
procedure TFormMain.MenuSaveScreenShotClick(Sender: TObject);
var
ms:TMemoryStream;
begin
// Save to Stream...
ms:=TMemoryStream.Create();
if dlgSaveScreenshot.Execute then
EdgeBrowser.CapturePreview(ms);
ms.Position:=0;
ms.SaveToFile('test.png');
end;