filippa

lack Point Tool to MapControl

Discussion created by filippa on Nov 23, 2013
Latest reply on Dec 5, 2013 by brenth
Hi forum
I have a problem with MapControl object.
I have developed an application with c# language and arcgis engine.
I have imported a toolbar developed for ArcMap desktop in a MapControl but some function developed for toolbar desktop don't work.
The follow function doesn't work but throws an exception at row of IDocument:
    
   private void SelectBlackPointTool()
        {
            try
            {
                IDocument ipDoc;
                ICommandBars ipCommandBars;
                ICommandItem ipCommandItem;
                UID ipUID = new UIDClass();
                ipDoc = m_application.Document as IDocument;
                ipCommandBars = ipDoc.CommandBars;
                ipUID.Value = "esriArcMapUI.SelectTool";
                ipCommandItem = ipCommandBars.Find(ipUID, false, false);
                m_application.CurrentTool = ipCommandItem;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

What can I change to correct the function in order to make it works?

Please help me!
Please!

Thanks in advance

Outcomes