2,142
社区成员
发帖
与我相关
我的任务
分享
private void Form1_Load(object sender, EventArgs e)
{
string FilePath;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Title = "请打开地图文档";
openFileDialog1.Filter = "Map Documents(*.mxd)|*.mxd";
openFileDialog1.ShowDialog();
FilePath = openFileDialog1.FileName;
if (axMapControl1.CheckMxFile(FilePath) == true)
{
axMapControl1.LoadMxFile(FilePath);
}
else
{
MessageBox.Show("选择有误");
}
}