如何在Vb.net中嵌入CefSharp Webbrowser控件?

问题描述 投票:-1回答:1

我需要将dll文件包含在表单控件中,以便将Web浏览器控件插入表单本身...我该怎么办?这次我真的需要帮助,因为我快疯了。如果您帮助我,请帮我一个大忙!

vb.net cefsharp
1个回答
0
投票

当您进行广告引用时,请通过代码添加浏览器控件(因为您不能通过设计器来添加它。)>

例如:

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
© www.soinside.com 2019 - 2024. All rights reserved.