Select Black Point Tool doesn't work in Windows MapControl

415
0
12-02-2013 07:29 AM
FilippaFideria
New Contributor
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
0 Kudos
0 Replies