Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Web searches from Windows form

paulmorrisonpaulmorrison Member Posts: 127
Aside from using this Google search thing, I would like to initiate web searches from a Windows form. I have seen a C.NET program that even lists the results in a Windows form. After linking to the pages, I could save the link to a database field.

Comments

  • Anastasiya  RafalukAnastasiya Rafaluk Member Posts: 1

    Take a look at the DotNetBrowser library. It provides Chromium-based WPF and WinForms browser controls, which are quite easy to embed into .NET application. It supports all the modern web standards including HTML5, CSS3 and JavaScript. The rendered page looks exactly like in Google Chrome.

    The library inherits Chromium's multi-process architecture – each web page is rendered in a separate Chromium process, and the application will continue working even after plugin crash or any other unexpected error occurs on the web page.

    Here are some other useful features, provided by DotNetBrowser: it is possible to listen to load events, handle network activity, configure proxy, simulate user actions, work with cookies, access and modify DOM, listen to DOM events, call JavaScript from .NET and vice versa, use web camera and microphone on the web page, set up WebRTC-based communication, and more.

    Check out the API Reference for more details.

    The code snippet below demonstrates how to create a BrowserView, embed it into a Form, and load a URL:

    using System.Windows.Forms;
    using DotNetBrowser;
    using DotNetBrowser.WinForms;
    
    namespace WinForms.DotNetBrowser
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                BrowserView browserView = new WinFormsBrowserView();
                Controls.Add((Control) browserView);
                browserView.Browser.LoadURL("http://www.youtube.com");
            }
        }
    }
    

    Once you run the example above you will get the following output:

    The library is commercial, however it is free for use in Open-Source and Academic projects. Commercial licenses include support packages for different team sizes. It is also possible to purchase the library’s source code.

    Besides its own page the component is available as NuGet package and as VSIX package in the Visual Studio Marketplace.

Sign In or Register to comment.