<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unable to get the window handle for the 'AxToolbarControl' control in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-the-window-handle-for-the/m-p/504577#M13554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS 10 application I am coding in VB.NET 2008. I have added a MapControl and a AxToolbarControl to the form with the MapControl being a buddy of the toolbar. The form is instantiated as a MDIChild of the main form. I have a feature that removes the MDIChild from the main form and moves it to a second monitor. This function worked fine when I had the MapControl alone, but when I added the toolbar control I get the error shown at the bottom of this message. This error occurs when the following line is executed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Me.MdiParent = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error shows up as the MDIChild form not showing up in the second monitor with no error being thrown. I had to click on Debug|Exceptions menus items then chck "Thrown" for all exception types to capture the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been able to find that similar errors occurred in an earlier version of ArcObjects and I was wondering if that may have cropped up again?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried placing the control in a panel, but that didn't help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jack&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10 ArcObjects&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{"Unable to get the window handle for the 'AxToolbarControl' control. Windowless ActiveX controls are not supported."}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;STACK TRACE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at System.Windows.Forms.AxHost.InPlaceActivate()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.AxHost.CreateHandle()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmShowWindow(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ContainerControl.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WmShowWindow(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.SetVisibleCore(Boolean value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.SetVisibleCore(Boolean value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.set_MdiParentInternal(Form value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.set_MdiParent(Form value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at V5UI.MapWindow.MoveToSecondMonitor() in P:\Projects\VS.NET 2008\V5UI\V5UI\Windows\MapWindow.vb:line 190&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InnerException.Message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 May 2010 16:05:07 GMT</pubDate>
    <dc:creator>JackAllread</dc:creator>
    <dc:date>2010-05-19T16:05:07Z</dc:date>
    <item>
      <title>Unable to get the window handle for the 'AxToolbarControl' control</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-the-window-handle-for-the/m-p/504577#M13554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS 10 application I am coding in VB.NET 2008. I have added a MapControl and a AxToolbarControl to the form with the MapControl being a buddy of the toolbar. The form is instantiated as a MDIChild of the main form. I have a feature that removes the MDIChild from the main form and moves it to a second monitor. This function worked fine when I had the MapControl alone, but when I added the toolbar control I get the error shown at the bottom of this message. This error occurs when the following line is executed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Me.MdiParent = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error shows up as the MDIChild form not showing up in the second monitor with no error being thrown. I had to click on Debug|Exceptions menus items then chck "Thrown" for all exception types to capture the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been able to find that similar errors occurred in an earlier version of ArcObjects and I was wondering if that may have cropped up again?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried placing the control in a panel, but that didn't help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jack&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10 ArcObjects&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{"Unable to get the window handle for the 'AxToolbarControl' control. Windowless ActiveX controls are not supported."}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;STACK TRACE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at System.Windows.Forms.AxHost.InPlaceActivate()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.AxHost.CreateHandle()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.CreateControl()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmShowWindow(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ContainerControl.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WmShowWindow(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.SetVisibleCore(Boolean value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.SetVisibleCore(Boolean value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.set_MdiParentInternal(Form value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.set_MdiParent(Form value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at V5UI.MapWindow.MoveToSecondMonitor() in P:\Projects\VS.NET 2008\V5UI\V5UI\Windows\MapWindow.vb:line 190&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;InnerException.Message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 16:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-the-window-handle-for-the/m-p/504577#M13554</guid>
      <dc:creator>JackAllread</dc:creator>
      <dc:date>2010-05-19T16:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the window handle for the 'AxToolbarControl' control</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-the-window-handle-for-the/m-p/504578#M13555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This problem was handled with the release version of ArcGIS 10 Engine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 20:12:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-get-the-window-handle-for-the/m-p/504578#M13555</guid>
      <dc:creator>JackAllread</dc:creator>
      <dc:date>2010-12-03T20:12:11Z</dc:date>
    </item>
  </channel>
</rss>

