在from1上新建地圖控件axmapcontrol1 axmapcontrol2,工具條控件axtoolbar1以及按鈕button1
以單擊按鈕事件觸發鷹眼圖刷新
private void button1_Click(object sender, System.EventArgs e)
{
axMapControl2.Refresh();
ISimpleFillSymbol sys = new SimpleFillSymbolClass();
ILineSymbol lin = new SimpleLineSymbolClass();
IColor color = new RgbColorClass();
color.NullColor = true;
sys.Color = color;
color.NullColor = false;
color.RGB = 255;
lin.Color = color;
lin.Width = 2;
sys.Outline = lin;
axMapControl2.ActiveView.ScreenDisplay.StartDrawing(axMapControl2.ActiveView.ScreenDisplay.hDC, (short)esriScreenCache.esriNoScreenCache);
axMapControl2.ActiveView.ScreenDisplay.SetSymbol((ISymbol)sys);
axMapControl2.ActiveView.ScreenDisplay.DrawPolygon((IGeometry)this.axMapControl1.Extent);
axMapControl2.ActiveView.ScreenDisplay.FinishDrawing();
axMapControl2.Update();
}