Welcome Guest Search | Active Topics | Sign In | Register

EO Browser open url using default browser Options
SNK
Posted: Monday, January 13, 2025 7:08:06 AM
Rank: Newbie
Groups: Member

Joined: 4/27/2022
Posts: 9
I have an issue with EO browser opening urls using external browser. How can I stop this behavior? Whenever I click on url I want to create a new EO browser dialog and display it there. I can sort of achieve this with NewWindow event, but I don't know how to cancel the default behavior so I end up with two windows.

Thanks!
SNK
Posted: Monday, January 13, 2025 9:08:22 AM
Rank: Newbie
Groups: Member

Joined: 4/27/2022
Posts: 9
Some extra info:

I am using wpf dialog to display webview
I have read this article (https://www.essentialobjects.com/doc/webbrowser/advanced/new_window.aspx), but I cannot figure out how to attach webview from the event to my wpf dialog.
eo_support
Posted: Monday, January 13, 2025 9:13:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,245
Hi,

We are not able to reproduce this problem. Can you provide a test page that we can use to reproduce it here?

Thanks!
SNK
Posted: Monday, January 13, 2025 9:23:05 AM
Rank: Newbie
Groups: Member

Joined: 4/27/2022
Posts: 9
Code: C#
private void Browser_NewWindow(object sender, EO.WebBrowser.NewWindowEventArgs e)
        {
            Form form1 = new Form();
            EO.WinForm.WebControl webControl = new EO.WinForm.WebControl();
            webControl.Dock = DockStyle.Fill;
            form1.Controls.Add(webControl);
            webControl.WebView = e.WebView;
            form1.Show();
            e.Accepted = true;
        }


I tried to copy example from the article and I am still seeing the same - I have winform dispalying my page and default browser displaying the same page.
eo_support
Posted: Monday, January 13, 2025 9:35:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,245
Hi,

Your code looks fine. Please send us a test page or test project so that we can debug it here. See here for more information on how to send test project to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
SNK
Posted: Tuesday, January 14, 2025 6:00:35 AM
Rank: Newbie
Groups: Member

Joined: 4/27/2022
Posts: 9
Thanks for your assistance. I found an issue in my code - there was another hidden new window event handler which was opening urls using external browser.
eo_support
Posted: Tuesday, January 14, 2025 12:44:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,245
Great. Glad that you found out the root cause. Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.