Form1.vb 482 B

1234567891011
  1. Imports CefSharp
  2. Imports CefSharp.WinForms
  3. Public Class Form1
  4. Public cefweb As ChromiumWebBrowser '’设置全局cefweb方便后期调用
  5. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  6. Cef.Initialize(New CefSettings) '新建cefsharp初始设置
  7. cefweb = New ChromiumWebBrowser("www.baidu.com") '新建实例化cefsharp浏览器,打开百度
  8. Me.Controls.Add(cefweb) '’将窗体绑定cefweb
  9. End Sub
  10. End Class