AnsweredAssumed Answered

Auto Hide Create Features Window using

Question asked by nikki_minton on Feb 8, 2012
Latest reply on Feb 8, 2012 by nikki_minton

I'm trying to auto hide the Create Features window in Arc 10 using .net.

I start editing through code so it doesn't open the create features window automatically so I then have code that opens the Create features window. However, I can't seem to then get it to hide. I had thought that I could access it using Idockablewindow but it doesn't seem to work.

This is my code that opens the Create Features window (this works fine)

Dim pUid As UID = New UID
pUid.Value = "esriEditor.CreateFeatureDockWinCommand" 'Create Features dockable window

Dim pitem As ICommandItem
pitem = g_App.Document.CommandBars.Find(pUid)

Then I run the following bit of code to try and hide the window

        Dim pDockableWindowsManager As IDockableWindowManager = TryCast(g_App, IDockableWindowManager)
        Dim CFWindow As IDockableWindow
        CFWindow = pDockableWindowsManager.GetDockableWindow(pUid)
        If CFWindow Is Nothing Then
            MsgBox("Nothing found")
        End If

Problem is that CFWindow is always nothing. I've tried the sample code in the help for IDockableWindow that picks up the TOC and put in the UID for the TOC instead of the create features one and my code works fine with that but it just doesn't work for picking up the create features window.

Any help would be much appreciated, I'm sure it's just something simple I must have missed out but it's driving me mad.