JeffBerry

ArcMap crashes on TabbedFeatureInspector sample

Discussion created by JeffBerry on Oct 27, 2011
The TabbedFeatureInspector, (VB.NET), sample crashes ArcMap when I do the following:

[INDENT]1. Open ArcMap.
2. Open map document with feature class with class extension loaded.
3. Select a feature.
4. Start an edit session.
5. Click the Attributes button to open the Attribute editor.
6. Click the Create Features tab.[/INDENT]
At this point the Create Features tab displays as a blank tab and ArcMap locks up. The wierd thing is that this only happens with the initial selection of a feature and opening of the Attribute editor. If you open the attribute editor, and then select a different feature before selecting the Create Feature tab ArcMap doesn't crash.

I initially found this by building a tabbed inspector into an application using the sample as the template. After discovering the problem I tried it in the TabbedFeatureInspector sample and found the same result.

The offending code appears to the be SetParent line in Inspect event where the inspector parent window is set to the groupbox on the user control.

Public Sub Inspect(ByVal objects As ESRI.ArcGIS.Editor.IEnumRow, ByVal Editor As ESRI.ArcGIS.Editor.IEditor) Implements ESRI.ArcGIS.Editor.IObjectInspector.Inspect

[INDENT]SetParent(Me.m_inspector.HWND, Me.GroupBox1.Handle.ToInt32)[/INDENT] [INDENT]ShowWindow(Me.m_inspector.HWND, SW_SHOW)[/INDENT]

Any suggestions on how I can correct this?

Outcomes