IWindowPosition.Move does not work.

728
1
06-08-2014 07:24 AM
SanajyJadhav
Occasional Contributor II
Hello,

Below is my code to move the Toolbar in the ArcMap.

 private void DockToolbar(string guidValue)
        {
            try
            {
                ICommandBars pCommandBars;
                ICommandBar pCommandBar;
              
                pCommandBars = pApps.Document.CommandBars;

                UID pUID = new UID();
                pUID.Value = guidValue;

                pCommandBar = (ICommandBar)pCommandBars.Find(pUID);

                if (pCommandBar != null)
                {
                    IWindowPosition windowPos = (IWindowPosition)pCommandBar;
                    pCommandBar.Dock(esriDockFlags.esriDockShow);
                    windowPos.Move(1000, 1000);
                }
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }


After running the code, IWindowPosition.Move does not have any effect on the Toolbar. I found here that this was a bug back in version 10.0. So, I would like to know if this bug has been fixed or not or is there any way to move the Toolbar to the desired location.

Basically, we are adding few toolbars to the ArcMap through the custom extension. And when these toolbars are added, either they are floating, on top of of each other or docked that shrinks the ArcMap map area. So, it would be great is know if there is any way to add the toolbars in an organized way.

OS : Windows 7 x64
ArcGIS version 10.2.1.

Any help is appreciated.

Thanks,
S.
0 Kudos
1 Reply
SanajyJadhav
Occasional Contributor II
If anybody is interested,I'm putting the ESRI response here.

ESRI Reply:

The behavior of IWindowPosition::Move is a logged equivalency bug NIM067611, however the bug is still not resolved and is at the "Assigned" status and till date we have no workaround to this/such situations.

Cheers,
S.
0 Kudos