EugeneK 19 Posted December 3, 2021 (edited) Hi When using TEdgeBrowser directly it is possible to set custom UserDataFolder property value. Is there a way to set it when using TWebBrowser with Edge engine? (Delphi 11 if that matters) Edited December 3, 2021 by EugeneK Share this post Link to post
PeterBelow 239 Posted December 4, 2021 18 hours ago, EugeneK said: Hi When using TEdgeBrowser directly it is possible to set custom UserDataFolder property value. Is there a way to set it when using TWebBrowser with Edge engine? (Delphi 11 if that matters) Well, TWebbrowser (in D11) has a protected method function GetEdgeInterface: TEdgeBrowser; To get at it you can use a cracker class, e.g. declared in the implementation section of the form unit containing the TWebbrowser control. type TWebBrowserCracker = class(TWebbrowser); In your code you can then do something like var Edge: TEdgeBrowser := TWebbrowserCracker(Webbrowser1).GetEdgeInterface; if Assigned(Edge) then begin Edge.UserDataFolder := SomeDirectory; Edge.ReinitializeWebView; end; Completely untested, so use at your own risk! 2 1 Share this post Link to post