1. Import CefSharp.WinForms, use NuGet to search for the package name
2. Set up the event solution platform
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
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);
}
}
}