<?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 : nullreferenceexception- dockingpanel help...</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : nullreferenceexception- dockingpanel help...]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 16:42:27 +0000</pubDate>
  <lastBuildDate>Fri, 12 Feb 2010 08:21:14 +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=16180</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[nullreferenceexception- dockingpanel help... : Dim Control, CtlProject As Xtr...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16180&amp;PID=56754&amp;title=nullreferenceexception-dockingpanel-help#56754</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 16180<br /><strong>Posted:</strong> 12 February 2010 at 8:21am<br /><br /> Dim Control, CtlProject As XtremeCommandBars.<b>CommandBarPopup</b><div><font color="#ff0000">CtlProject =wndAxCommandBars.ActiveMenuBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlPopup,100, "New", -1, False)<br><br><br></font></div>]]>
   </description>
   <pubDate>Fri, 12 Feb 2010 08:21:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16180&amp;PID=56754&amp;title=nullreferenceexception-dockingpanel-help#56754</guid>
  </item> 
  <item>
   <title><![CDATA[nullreferenceexception- dockingpanel help... : dear all:  i meet an an err:...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16180&amp;PID=56751&amp;title=nullreferenceexception-dockingpanel-help#56751</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5816">Jack.Lau</a><br /><strong>Subject:</strong> 16180<br /><strong>Posted:</strong> 11 February 2010 at 10:44pm<br /><br /><DIV>dear all:</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i meet an an err: <U>System.NullReferenceException:Objec reference not set to an instance of an object </U>when </DIV><DIV>show a child form with dockingpanel and commandbar control in a mdi form.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff><strong>&nbsp;&nbsp;&nbsp;&nbsp; step1: create a mdi form "MDIParent1" with&nbsp;menu item&nbsp;"new form"</strong></FONT></DIV><DIV><FONT color=#0000ff><strong>&nbsp;&nbsp;&nbsp;&nbsp; step2: create another form "Form1"</strong></FONT></DIV><DIV><strong><FONT color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp; step3: put a dockingpanel and commandbar&nbsp; control in form1, put <FONT color=#0000ff>another two </FONT></FONT><FONT color=#0000ff>RichTextBoxs as panels</FONT></strong></DIV><DIV><FONT color=#0000ff><strong>&nbsp;&nbsp;&nbsp;&nbsp; step4: code in form1 is follows:</strong></FONT></DIV><DIV>Public Class Form1</DIV><DIV>&nbsp;&nbsp;&nbsp; Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Control, CtlProject As XtremeCommandBars.CommandBarControl</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CtlProject = wndAxCommandBars.ActiveMenuBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlPopup, 100, "New", -1, False)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With CtlProject.CommandBar.Controls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control = .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 200, "Exit")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control = .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 300, "Login")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndAxDockingPane.SetCommandBars(wndAxCommandBars.GetDispatch)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndAxDockingPane.Options.HideClient = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim panA, panB As XtremeDockingPane.Pane<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panA = wndAxDockingPane.CreatePane(1, 220, 1200, XtremeDockingPane.DockingDirection.DockLeftOf, Nothing) '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panA.title = "This pane1"</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panB = wndAxDockingPane.CreatePane(2, 220, 1200, XtremeDockingPane.DockingDirection.DockBottomOf, panA) '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panB.title = "This pane1"</DIV><DIV>&nbsp;&nbsp;&nbsp; End Sub</DIV><DIV>&nbsp;&nbsp;&nbsp; Private Sub wndAxDockingPane_AttachPaneEvent(ByVal sender As System.Object, ByVal e As AxXtremeDockingPane._DDockingPaneEvents_AttachPaneEvent) Handles wndAxDockingPane.AttachPaneEvent<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case e.item.Id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case 1 : e.item.Handle = RichTextBox1.Handle.ToInt32<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case 2 : e.item.Handle = RichTextBox2.Handle.ToInt32<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select<BR>&nbsp;&nbsp;&nbsp; End Sub<BR>End Class</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><FONT color=#0000ff>step5: code in MDIParent1 is follows:</FONT></strong></DIV><DIV>Imports System.Windows.Forms</DIV><DIV>Public Class MDIParent1</DIV><DIV>&nbsp;&nbsp;&nbsp; Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripMenuItem.Click, NewToolStripButton.Click<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim ChildForm As New Form1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChildForm.MdiParent = Me</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Static Dim m_ChildFormNumber As Integer<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_ChildFormNumber += 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChildForm.Text = "Doc - " &amp; m_ChildFormNumber</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChildForm.Show()<BR>&nbsp;&nbsp;&nbsp; End Sub<BR>End Class</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><FONT color=#0000ff>step5:&nbsp;when startwith form1, every thing runs well, includes the commandbar and dockingpanel control</FONT></strong></DIV><DIV><FONT color=#0000ff><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><strong><FONT color=#0000ff>step6:&nbsp;when start with MDIParent1 , it shows the form1 as a child form, when use the&nbsp;commandbar and dockingpanel control,</FONT></strong></FONT></DIV><DIV><strong><FONT color=#0000ff>error occurs:</FONT></strong></DIV><DIV><strong><FONT color=#0000ff>&nbsp; err1: with commandbar </FONT></strong></DIV><DIV>&nbsp;&nbsp;&nbsp; Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Control, CtlProject As XtremeCommandBars.CommandBarControl</DIV><DIV><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CtlProject = wndAxCommandBars.ActiveMenuBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlPopup, 100, "New", -1, False)</FONT></DIV><DIV><FONT color=#ff0000>-----&gt;<U><strong>System.NullReferenceException:Objec reference not set to an instance of an object</strong> </U></FONT></DIV><DIV>&nbsp;</DIV><DIV><strong><FONT color=#0000ff>&nbsp; err2: with dockingpanel </FONT></strong></DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Control, CtlProject As XtremeCommandBars.CommandBarControl</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'CtlProject = wndAxCommandBars.ActiveMenuBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlPopup, 100, "New", -1, False)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'With CtlProject.CommandBar.Controls<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp; Control = .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 200, "Exit")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp; Control = .Add(XtremeCommandBars.XTPControlType.xtpControlButton, 300, "Login")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;&nbsp; Control.BeginGroup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'End With</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndAxDockingPane.SetCommandBars(wndAxCommandBars.GetDispatch)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wndAxDockingPane.Options.HideClient = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim panA, panB As XtremeDockingPane.Pane<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panA = wndAxDockingPane.CreatePane(1, 220, 1200, XtremeDockingPane.DockingDirection.DockLeftOf, Nothing) '<BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#ff0000>&nbsp;&nbsp;&nbsp; panA.title = "This pane1"-----&gt;<U><strong>System.NullReferenceException:Objec reference not set to an instance of an object</strong> </U></FONT></DIV><DIV>-------------------------------------</DIV><DIV><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><SPAN lang=EN-US style="COLOR: red"><FONT size=3><FONT face=&#23435;&#20307;>Visual Studio 2005 8.0.50727.42<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><?:NAMESPACE PREFIX = O /><O:P></O:P></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><SPAN lang=EN-US style="COLOR: red"><FONT size=3><FONT face=&#23435;&#20307;>Visual Basic Project<O:P></O:P></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><SPAN lang=EN-US style="COLOR: red"><FONT size=3><FONT face=&#23435;&#20307;>.net framework 2.0.50727<O:P></O:P></FONT></FONT></SPAN></P><P style="MARGIN: 0cm 0cm 0pt" ="Ms&#111;normal"><SPAN lang=EN-US style="COLOR: red"><FONT size=3><FONT face=&#23435;&#20307;>Codejock<?:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><?:NAMESPACE PREFIX = ST1 /><ST1:CHSDATE Year="1899" M&#111;nth="12" Day="30" IsLunarDate="False" IsROCDate="False" w:st="&#111;n">13.2.1 ActiveX</FONT></FONT></SPAN></P></ST1:CHSDATE></DIV>]]>
   </description>
   <pubDate>Thu, 11 Feb 2010 22:44:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16180&amp;PID=56751&amp;title=nullreferenceexception-dockingpanel-help#56751</guid>
  </item> 
 </channel>
</rss>