CefSharp.WinForms不会加载页面?

时间:2016-12-31 21:58:29

标签: c# winforms chromium-embedded cefsharp

你好我想在win form中加载我的面板上的页面,但它不会渲染它吗? 这是我的代码:

    private GeoCoordinateWatcher watcher = null;
    public ChromiumWebBrowser myBrowser;
    private string _username;
    public MainForm()
    {
        InitializeComponent();
        watcher = new GeoCoordinateWatcher();
        // in order to find vehicle location we must use geocoordinate from System.Device.Location
        watcher.StatusChanged += Watcher_StatusChanged;
        watcher.Start();

        // to use diffrent webbrowser control first we must initialize cef.dll controls 
        Cef.Initialize(new CefSettings());
        myBrowser = new ChromiumWebBrowser("www.google.com");
        this.Controls.Add(myBrowser);
        //webPanel.Controls.Add(myBrowser);
        myBrowser.Dock = DockStyle.Fill;          
    }

0 个答案:

没有答案