//this method zooms the map to the selected location, after the user double-clicks the point locaction in the listbox private void lstMissingVertices_DoubleClick(object sender, EventArgs e) { try { IPoint pPointXY = new PointClass(); double X; double Y; object[] XY; IEnvelope pEnvelope; XY = lstMissingVertices.SelectedItem.ToString().Split(' '); X = Convert.ToDouble(XY.GetValue(0)); Y = Convert.ToDouble(XY.GetValue(1)); //set the point's xy values pPointXY.X = X; pPointXY.Y = Y; pEnvelope = pActiveView.Extent; pEnvelope.CenterAt(pPointXY); pActiveView.Extent = pEnvelope; pMap.MapScale = 100; pActiveView.Refresh(); } catch (Exception ex) { MessageBox.Show("Error Message: " + Environment.NewLine + ex.Message + Environment.NewLine + Environment.NewLine + "Error Source: " + Environment.NewLine + ex.Source + Environment.NewLine + Environment.NewLine + "Error Location:" + Environment.NewLine + ex.StackTrace, "AGRC Custom Tools ArcMap Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }