以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  想请教如何初始化 CefSharp  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=178858)

--  作者:jnletao
--  发布时间:2022/7/24 17:23:00
--  想请教如何初始化 CefSharp
在网上下载了 CefSharp  vb.net 版,想着移植到狐表,可是在初始化这步难住了。请教老师初始化代码怎么写

图片点击可在新窗口打开查看此主题相关图片如下:1220475.jpg
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:capture_20220724171424758.bmp
图片点击可在新窗口打开查看


以下内容为程序代码:

1 Dim pnl As WinForm.Panel = e.Form.Controls("Panel1")
2 Dim setting = New CefSharp.CefSettings()
3 setting.BrowserSubprocessPath = Application.StartupPath & "\\CefSharp.BrowserSubprocess.exe"
4 setting.LocalesDirPath = Application.StartupPath & "\\locales\\"
5 setting.ResourcesDirPath = Application.StartupPath & "\\"
6 setting.CachePath = Application.StartupPath & "\\temp\\"
7 setting.Locale = "zh-CN"
8 setting.UserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
9 setting.CefCommandLineArgs("--disable-web-security") = String.Empty
10 setting.CefCommandLineArgs("enable-media-stream") = True
11 setting.CefCommandLineArgs("enable-system-flash") = True
12 setting.CefCommandLineArgs("ppapi-flash-version") = "21.0.0.182"
13 setting.CefCommandLineArgs("ppapi-flash-path") = "C:\\foxtable\\Professional\\pepflashplayer.dll"
14 CefSharp.Cef.Initialize(setting)
15 \'CefSharp.Cef.Initialize
16
17 Dim ChromiumWebBrowser = New CefSharp.WinForms.ChromiumWebBrowser("http://www.baidu.com")
18 ChromiumWebBrowser.Dock = System.Windows.Forms.DockStyle.Fill
19 pnl.basecontrol.controls.add(ChromiumWebBrowser)







--  作者:jnletao
--  发布时间:2022/7/24 17:25:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:capture_20220724172345616.jpg
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2022/7/24 20:26:00
--  
这个东西没有时间去研究,自行看文档,然后到vs里调通再用到Foxtable里。