laptop and a wrench

Bug

Developer Samples: IContentsView.cs and IContentsView.vb leave a reminant over the Table of Contents (TOC) in ArcMap.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM002526
SubmittedMay 15, 2006
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.1
Program languageVB.Net
Version Fixed9.3
StatusFixed

Workaround

The problem can be fixed by adding Win32 ShowWindow function to IContentsView class (both for VB.NET and C#). Step 1. Add the following Win32 call IContentsView class: private const int SW_SHOW = 9; private const int SW_HIDE = 0; //Win32 API Calls [DllImport("User32.dll")] public static extern int ShowWindow( int hwnd, int nCmd);Step 2. In Activate() of the ContentsView, show the TOCControl as shown below: In public void Activate(int parentHWnd, IMxDocument Document) { ShowWindow(m_tocControl.hWnd, SW_SHOW); }Step 3. In Deactivate() of ContentsView hide the TOCControl as shown below: In public void Deactivate() { ShowWindow(m_tocControl.hWnd, SW_HIDE); }Complie the project and sample should work properly.

Steps to Reproduce

Bug ID: NIM002526

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options