基于cefsharp的浏览器应用开发(支持XP系统)

一、开发环境

 VS2013 + CefSharp WinForms 37.0.3

基于cefsharp的浏览器应用开发(支持XP系统)_第1张图片


二、CefSharp WinForms 37.0.3 安装方法:

1. VS2013: 工具 -> NuGet包管理器 -> 程序包管理器控制台

2. 输入命令:Install-Package CefSharp.WinForms -Version 37.0.3


三、主要代码

namespace WindowsFormsBrowser
{
    public partial class Form1 : Form
    {
        public ChromiumWebBrowser browser;

        public Form1()
        {
            InitializeComponent();
            InitBrowser();
        }

        public void InitBrowser()
        {
            Cef.Initialize(new CefSettings());
            browser = new ChromiumWebBrowser("www.baidu.com");
            this.Controls.Add(browser);
            browser.Dock = DockStyle.Fill;
        }

        private void Form1_Load_1(object sender, EventArgs e)
        {
            WindowState = FormWindowState.Maximized;
        }
    }
}

四、运行效果

基于cefsharp的浏览器应用开发(支持XP系统)_第2张图片


附:CefSharp Release Branches

With each release a new branch is created, for example the 53.0.1 release corresponds to the cefsharp/53 branch. If your new to CefSharp and are downloading the source to check it out, please use a Release branch

Branch CEF Version VC++ Version .Net Version Status
master 3029 2013 4.5.2 Development
cefsharp/57 2987 2013 4.5.2 Release
cefsharp/55 2883 2013 4.5.2 Unsupported
cefsharp/53 2785 2013 4.5.2 Unsupported
cefsharp/51 2704 2013 4.5.2 Unsupported
cefsharp/49 2623 2013 4.0 Unsupported
cefsharp/47 2526 2013 4.0 Unsupported
cefsharp/45 2454 2013 4.0 Unsupported
cefsharp/43 2357 2012 4.0 Unsupported
cefsharp/41 2272 2012 4.0 Unsupported
cefsharp/39 2171 2012 4.0 Unsupported
cefsharp/37 2062 2012 4.0 Unsupported
所以 cefsharp/49 也是支持XP系统的,安装命令为:Install-Package CefSharp.WinForms -Version 49.0.1

你可能感兴趣的:(c#)