Cefsharp integrated into C #

Source: Internet
Author: User

First Step Installation: Cefsharp

Search for Cefsharp in this area and click Install

After searching for the appropriate components, click Install.

The installation takes about a few minutes, and when you're done, a packages.config file appears in the project.
When my colleague completes, the corresponding DLL package appears in the reference, and I do not add it to the reference when I finish it, and I add it manually to the reference.

The location of these DLL packages is that when the component is installed, an extra Packages folder will be created inside the project.


I refer here to the X86 file, for example:

    D:\going-svn-2015\xiandaic#\go-logistics-client-c#\packages\cefsharp.common.39.0.1\cefsharp\x86\cefsharp.dll

After the introduction is complete, you need to modify the project generation policy:

You can then write the program:

  InitializeComponent ();
            String url = Globaldefination.urlex + "/go-logistics-client/inandoutpages/incomecontract/contractmg/ Contractmain.jsp "; 
            Webbrowser.navigate (url+ "? sessionid=" + adapter.) SESSIONID);

            String url =  Globaldefination.urlex + "/go-logistics-client/inandoutpages/incomecontract/contractmg/ Contractmain.jsp?sessionid= "+ Adapter. SessionId;
            CefSharp.WinForms.ChromiumWebBrowser wb = new CefSharp.WinForms.ChromiumWebBrowser (URL);
            Wb. Dock = DockStyle.Fill;
            This. Controls.Add (WB);

To this component installation complete, open the program test, my colleague's machine is good, but my not good, said is lacks the corresponding dependence ah. I'm going crazy. For an afternoon.

Copy these files from the x86 folder to the C # project \bin\x86\debug folder

Then restart the program and test OK.

Component integration came in, is going to write procedures, and problems, using Chromiumwebbrowser as a browser, but I used to write on the interface of the file download function is not good, the query is CEF to download the file by default are shielded slightly, really let people crazy. The following section describes how to handle the problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.