Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I redirect a TEdgebrowser popup window to my own form?

With the TEdgeBrowser.OnNewWindowRequested event, I can obviously tell that a new window is about to open, but how can I capture the output to my own custom TForm with a second TEdgeBrowser component?

like image 531
Stan Campsmith Avatar asked Jan 23 '26 05:01

Stan Campsmith


1 Answers

The TEdgeBrowser.OnNewWindowRequested event handler has a parameter named Args of type TNewWindowRequestedEventArgs, which implements Edge's ICoreWebView2NewWindowRequestedEventArgs interface. You can call its put_NewWindow() method, providing it with the ICoreWebView2 interface of the desired browser window, which you can get from the TEdgeBrowser.DefaultInterface property.

like image 90
Remy Lebeau Avatar answered Jan 25 '26 20:01

Remy Lebeau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!