A very frustrating error is being thrown in the below code:
try
{
FrmRestrictedWebBrowser frmRWB2 = new FrmRestrictedWebBrowser();
frmRWB2.Show(dockPanel, DockState.Document);
frmRWB2.ShowSrcUrl(eur.LinkUrl);
}
catch (Exception ex)
{
string err = ex.Message;
throw;
}
The Error: Stack trace
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.SuspendFocusTracking() at WeifenLuo.WinFormsUI.Docking.DockPanel.SuspendLayout(Boolean allWindows) at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Show(DockPanel dockPanel, DockState dockState) at WeifenLuo.WinFormsUI.Docking.DockContent.Show(DockPanel dockPanel, DockState dockState) at Imogen.frmMain.ProcessUnReported(EUReported eur) in C:\Users\Dave\Documents\Visual Studio 2015\Projects\Imogen\Imogen\frmMain.cs:line 244
Error Message:
Object reference not set to an instance of an object.
As you can see all I am doing is creating a new form and trying to show it. Everything says that it is working until the .Show(dockPanel, DockState.Document) The Form and the dockPanel exist and have handles so I don't know what is going on.
Any ideas?