Anyway to put Webbrowser control popups inside a new webbrowser instance
-
06-07-2019 - |
Question
They reason i want to do this is so that I can actually have some control over the popup because there is a certain button that I'd like to click.
Thanks
Edit: using windows forms, here is the code for the webbrowser control
WebBrowser w = new WebBrowser();
w.Dock = DockStyle.Bottom;
w.Location = new Point(0, 34);
w.MinimumSize = new Size(20, 20);
w.Name = "Webbrowser";
w.ScriptErrorsSuppressed = true;
w.Size = new Size(616, 447);
w.TabIndex = 1;
f.Controls.Add(w);
w.NewWindow += new System.ComponentModel.CancelEventHandler(w_NewWindow);
w.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(w_DocumentCompleted);
w.Navigate(url);
The URL I broswers to has a popup which I don't want to close, but rather put into a new webbrowser control as opposed to IE if possible.
Any ideas?
Solution
If I understand your question...
Take a look at the NewWindow2 event. In particular, you want to set the ppDisp parameter to a "new InternetExplorer" object.
OTHER TIPS
Look into Modial Windows. That works for only IE. However you can do the same with JavaScript and JQuery Ui Core has a nice on.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow