My management is concerned with the 'removal' of IE from Windows.
I have a bunch of old CGI pages that are very... shall we say brittle and very complex. I would very much like to not change them.
Our customers currently use a Winforms desktop application that uses a WebBrowser control to show the pages.
At certain points new browser windows are opened containing information. These windows are important to the workflow.
As an experiment, I turned off IE 11 and tried the navigate the CGI pages. Everything looked okay except when the buttons were pressed that open new browser pages. When those buttons were pressed, nothing happened.
The NewWindow event IS fired but no new Window appears. I am guessing the window was opened in a 'tab' that cannot be viewed in the WebBrowser control? Or perhaps the WebBrowser is hard coded to lunch a new IE browser (which no longer exists)?
There is nothing in the EventViewer and no exceptions are thrown and nothing bad shows in the output window while debugging.
I have turned off the setting in Edge that blocks popups.
I have targeted the newest .NET framework version.
Everything works when I just navigate with Edge except that the pages appear in tabs, not new windows.
I cannot find a setting to force Edge to open new windows in separate instances.
After much painful trial and error I was able to get the new WebView2 control to work but I don't think that is ready for prime time. I had to install something called Edge Canary that initially hung my UI and I had to use Task Manager to kill it. That's not really something I want to have our customers do.
Thanks for any help.
Asked
Active
Viewed 45 times
0

Belmiris
- 2,741
- 3
- 25
- 29
-
Potentially helpful: https://stackoverflow.com/questions/60530614/net-webbrowser-control-popup-wont-open-in-control – Nick is tired Nov 16 '21 at 23:34
-
I think there is no such control to achieve your requirements. You can only capture this request through the [WebView2NewWindowRequested](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2newwindowrequestedeventargs?view=webview2-dotnet-1.0.1056-prerelease) event (using `window.open()` and so on), cancel to open it, or replace this window with your own. – Xudong Peng Nov 17 '21 at 08:30
-
This was the answer for me. Thanks for the hints in the comments. https://stackoverflow.com/questions/6470842/how-do-i-display-a-popup-from-a-webbrowser-in-another-window-i-created – Belmiris Nov 19 '21 at 22:32