Your code has errors , How to fix ??

  • 360 Views
  • Last Post 28 September 2020
vmars316 posted this 27 September 2020

Hello ;

https://foxlearn.com/article/chromium-browser-using-cefsharp-in-csharp-151.html

I am getting errors from your code , these lines : 

Cef.Initialize(settings);

this.pContainer.Controls.Add(chrome);

chrome.AddressChanged += Chrome_AddressChanged;

private void Chrome_AddressChanged(object sender, AddressChangedEventArgs e)

chrome.Back();

chrome.Forward();

Cef.Shutdown();

Please , How to fix ?

Thanks for your Help...

 

vmars316 posted this 28 September 2020

Hello ;

Turns out your demo code didnt show all the Using statements I needed so I added all this:

using CefSharp.WinForms;

using CefSharp.WinForms.Internals;

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using CefSharp;

using cef;

 

And those errors all way nt away 

But now I have a new errors , for all the Button_Clicks : 

System.NullReferenceException: 'Object reference not set to an instance of an object.'

Please Help...

Thanks

 

Close