C # Building a CEF3 analog browser

1. Import CefSharp.WinForms, use NuGet to search for the package name

Share pictures

share picture

2. Set up the event solution platform

Share pictures

share picture

If there is no x86 platform, just “New->x86” will do. Use the x86 platform to run the cef program

namespace JDKey

{
public partial class Form1: Form
{
public ChromiumWebBrowser browser {get; set;}
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
browser
= new ChromiumWebBrowser("www.baidu.com");
this.Controls.Add(browser);
}
}
}

Success

Share pictures

namespace JDKey

{
public partial class Form1: Form
{
public ChromiumWebBrowser browser {get; set;}
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
browser
= new ChromiumWebBrowser("www.baidu.com");
this.Controls.Add(browser);
}
}
}

Leave a Comment

Your email address will not be published.