我需要将dll文件包含在表单控件中,以便将Web浏览器控件插入表单本身...我该怎么办?这次我真的需要帮助,因为我快疯了。如果您帮助我,请帮我一个大忙!
jiayoushixin 回答:如何在vb.net中嵌入CefSharp Webbrowser控件?
广告参考时,请通过代码添加浏览器控件(因为无法通过设计器来添加)。
例如:
Public Sub New()
InitializeComponent()
Dim CefSharp_Settings As New CefSettings With {
.ResourcesDirPath = Application.StartupPath,.LocalesDirPath = Application.StartupPath & "\locales",.CachePath = Application.StartupPath & "\CefSharp Cache"
}
CefSharp_Settings.CefCommandLineArgs.Add("persist_session_cookies","1")
CefSharp.Cef.Initialize(CefSharp_Settings)
chromeBrowser = New ChromiumWebBrowser("www.google.com") With {
.Dock = DockStyle.Fill
}
Me.Controls.Add(chromeBrowser)
End Sub