首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TEdgeBrowser.CapturePreview到流

TEdgeBrowser.CapturePreview到流
EN

Stack Overflow用户
提问于 2021-12-10 16:34:34
回答 1查看 195关注 0票数 0
代码语言:javascript
复制
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;

代码语言:javascript
复制
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;

EN

回答 1

Stack Overflow用户

发布于 2022-01-15 08:45:42

将您的流保存在事件CapturePreviewCompleted上。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70307677

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档