安装AE 10.0
打开VS 2010 选择ArcGIs—Extending ArcObjects—MapControl Application
打开界面如图所示
给窗体添加一个书签窗体
输入如下代码
C# Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
using System;
using System.Collections.Generic; using ponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms;
namespace MapControlApplication1 {
public partial class admitBookmarkName : Form {
public admitBookmarkName(MainForm frm) { InitializeComponent(); if (frm != null) {
m_frmMain = frm; } }
public MainForm m_frmMain;
private void 确定_Click(object sender, EventArgs e) {
if (m_frmMain != null && tbbookmarkname.Text != "") m_frmMain.creatbookmark(tbbookmarkname.Text); this.Close(); } } }