1.语言vbnet

2.cefsharp版本:88.2.90

3..net设置为NET Framework 4.5.2

4.debug设置为x86或者x64

5.nuget管理程序搜索cefsharp,选择版本88.2.90,安装

6.主窗体代码如下:

Imports CefSharp
Imports CefSharp.WinForms

Public Class Form1
Public cefweb As ChromiumWebBrowser ‘’设置全局cefweb方便后期调用
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Cef.Initialize(New CefSettings) ‘新建cefsharp初始设置
cefweb = New ChromiumWebBrowser(“https://www.baidu.com”) ‘新建实例化cefsharp浏览器,打开百度
Me.Controls.Add(cefweb) ‘’将窗体绑定cefweb
End Sub
End Class

7.启动测试