<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : DockingPane - NullReferenceException</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : DockingPane - NullReferenceException]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 27 Apr 2026 14:31:09 +0000</pubDate>
  <lastBuildDate>Fri, 04 Jun 2010 16:15:30 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=16784</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[DockingPane - NullReferenceException : Thank you for the reply. I thought...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58796&amp;title=dockingpane-nullreferenceexception#58796</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5314">modwyer8</a><br /><strong>Subject:</strong> 16784<br /><strong>Posted:</strong> 04 June 2010 at 4:15pm<br /><br />Thank you for the reply.&nbsp; I thought of looking at that example as I was falling asleep last night.&nbsp; I should have thought of that sooner.<br><br>Sorry if this post turns out to be a bit long.&nbsp; <br><br>I have it working to where the form with the docking panes opens as a child of the MDIContainer (which itself does not have a docking pane manager) but the events I set up for the DockingPaneManager are not getting fired off when I create the Pane Objects.&nbsp; (.GetClientBordersWidth, .AttachPaneEvent...)&nbsp; <br><br>I no longer get the NullReferenceException error and some lines of debug code I put in after creating the Panes show they are not null.&nbsp; But when my form opens the calendar object (the client part of the DockingPaneManager) is the same size (small) as it is in Design view and there are no panes.<br><br>I am pretty sure this is because the events for the DockingPaneManager are not getting hit.&nbsp; <br><br>Are the main differences between the SDI and MDI examples that the MDI example has the "foreach (Control ctrl in this.Controls)..." loop in frmMain that calls SetMDIClient, for a form set to be an MDIContainer - and then putting the initialization of the DockingPaneManager control in the Load of the form with Docking Panes that is to be the child form, as in frmDocument?<br><br>Is there something else I am missing?<br><br>Again, thanks for the help.<br><br>Here is the Load of my child form:<br>private void frmCalendar_Load(object sender, EventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // DockingPaneManager<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager = new AxXtremeDockingPane.AxDockingPane();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCalendar));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((System.ComponentModel.ISupportInitialize)(this.DockingPaneManager)).BeginInit();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.Enabled = true;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.Location = new System.Drawing.Point(58, 233);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.Name = "DockingPaneManager";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("DockingPaneManager.OcxState")));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.Size = new System.Drawing.Size(24, 24);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.TabIndex = 16;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.ResizeEvent += new System.EventHandler(this.DockingPaneManager_ResizeEvent);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.AttachPaneEvent += new AxXtremeDockingPane._DDockingPaneEvents_AttachPaneEventHandler(this.DockingPaneManager_AttachPaneEvent);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.GetClientBordersWidth += new AxXtremeDockingPane._DDockingPaneEvents_GetClientBordersWidthEventHandler(this.DockingPaneManager_GetClientBordersWidth);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.DockingPaneManager.Action += new AxXtremeDockingPane._DDockingPaneEvents_ActionEventHandler(this.DockingPaneManager_Action);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.Controls.Add(this.DockingPaneManager);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((System.ComponentModel.ISupportInitialize)(this.DockingPaneManager)).EndInit();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.ScaleMode = XtremeDockingPane.XTPScaleMode.xtpScalePixel;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // create side tabbed panes<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreatePaneObjects();<br>}<br><br>Here is&nbsp; CreatePaneObjects():<br><br>private void CreatePaneObjects()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Determine if Alpha Context is supported, if it is, then enable it<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Determine if Docking Stickers is supported, if they are, then enable them<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (Environment.OSVersion.Version.Major &gt;= 5)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.Options.AlphaDockingContext = true;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.Options.ShowDockingContextStickers = true;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.Options.AlphaDockingContext = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.Options.ShowDockingContextStickers = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.Options.ShowCaptionMaximizeButton = true;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pane curMo = DockingPaneManager.CreatePane(0, 207, 159, XtremeDockingPane.DockingDirection.DockLeftOf, null);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; curMo.Title = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(DateTime.Now.Month);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; curMo.MinTrackSize.SetSize(201, 153);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; curMo.MaxTrackSize.SetSize(210, 159);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DockingPaneManager.Options.ThemedFloatingFrames = true;<br>}&nbsp;&nbsp; <br>]]>
   </description>
   <pubDate>Fri, 04 Jun 2010 16:15:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58796&amp;title=dockingpane-nullreferenceexception#58796</guid>
  </item> 
  <item>
   <title><![CDATA[DockingPane - NullReferenceException : Please see the MDI Docking C#...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58795&amp;title=dockingpane-nullreferenceexception#58795</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 16784<br /><strong>Posted:</strong> 04 June 2010 at 1:12pm<br /><br />Please see the MDI Docking C# or VB.Net sample, it shows how to add DP in MDI Child and as normal form.<br><br>"C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v13.4.0\Samples\Common\VB.NET\MDIDocking\MDIDocking.sln"]]>
   </description>
   <pubDate>Fri, 04 Jun 2010 13:12:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58795&amp;title=dockingpane-nullreferenceexception#58795</guid>
  </item> 
  <item>
   <title><![CDATA[DockingPane - NullReferenceException : It seems that I get the NullReferenceException...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58784&amp;title=dockingpane-nullreferenceexception#58784</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5314">modwyer8</a><br /><strong>Subject:</strong> 16784<br /><strong>Posted:</strong> 03 June 2010 at 12:39pm<br /><br />It seems that I get theNullReferenceException error when I set the MDIParent of the form thatcontains the DockingPanes.&nbsp; If I remove that line then the formlaunches fine. <br><br>Now the question is, can the docking panes NOT be used on a child form in an MDI app?]]>
   </description>
   <pubDate>Thu, 03 Jun 2010 12:39:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58784&amp;title=dockingpane-nullreferenceexception#58784</guid>
  </item> 
  <item>
   <title><![CDATA[DockingPane - NullReferenceException : Hi-I found another post with this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58782&amp;title=dockingpane-nullreferenceexception#58782</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5314">modwyer8</a><br /><strong>Subject:</strong> 16784<br /><strong>Posted:</strong> 03 June 2010 at 11:45am<br /><br />Hi-<br><br>I found another post with this problem that has no resolution.&nbsp; http://forum.codejock.com/forum_posts.asp?TID=16179<br><br>I followed the SDISample.PDF tutorial and created a form that had docking panes on it.&nbsp; It worked great.&nbsp; I then followed the same steps and added it as a form to my application.&nbsp; Every time I try to launch the form with the docking panes on it I get the error:<br>System.NullReferenceException was unhandled by user code<br>&nbsp; Message="Object reference not set to an instance of an object."<br><br>on the line where I set the .Title of the first pane:<br>paneA.Title = "Pane A";<br>&nbsp; &nbsp; <br>I don't understand why this works as a separate app but not as a form.&nbsp;&nbsp; I even went so far as to add in the DockingPane example provided by CodeJock as a form in my application.&nbsp; I get the same error with that.&nbsp; I didn't modify the code at all.&nbsp; It is the exact sample that CodeJock provides which works on its own.<br><br>Does the docking pane work when it is a form in an application or must it be only used in the main form of a standalone app?&nbsp; <br><br>Does anyone have any suggestions?<br><br>It appears that .CreatePane is not creating a pane.<br><br>Thank you for your help.<br><br><br>StackTrace:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at MDI_Test.frmCalendar.frmCalendar_Load(Object sender, EventArgs e) in C:\MailManager\Copy of Tester_MDI_Test\MDI_Test\frmCalendar.cs:line 743<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Form.OnLoad(EventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Form.SetVisibleCore(Boolean value)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Control.Show()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at MDI_Test.ECFMail.tsBtnCal2_Click(Object sender, EventArgs e) in C:\MailManager\Copy of Tester_MDI_Test\MDI_Test\ECFMail.cs:line 4001<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Control.WndProc(Message&amp; m)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.ToolStrip.WndProc(Message&amp; m)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br><br>]]>
   </description>
   <pubDate>Thu, 03 Jun 2010 11:45:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16784&amp;PID=58782&amp;title=dockingpane-nullreferenceexception#58782</guid>
  </item> 
 </channel>
</rss>