C#, WPF, webbrowser, detect new window open« Wróć do listy pytań

NewWindow event
Wysłane przez mrmucha
Zadane przez 12/01/2020 16:09
0
            SHDocVw.IWebBrowser2 axBrowser = typeof(WebBrowser).GetProperty("AxIWebBrowser2", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(web, null) as SHDocVw.IWebBrowser2;
            ((SHDocVw.DWebBrowserEvents_Event)axBrowser).NewWindow += OnWebBrowserNewWindow;


        private void OnWebBrowserNewWindow(string URL, int Flags, string TargetFrameName, ref object PostData, string Headers, ref bool Processed)
        {
            Processed = true;
            MessageBox.Show("TEST");
        }

Wysłane przez mrmucha
Odpowiedziane 12/01/2020 16:09