Public Class MapDialog Private m_activeView As IActiveView Private Sub LoadMapButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadMapButton.Click Try Dim path As String = "C:\Development\ApplicationTest\Mxd\Quantico.mxd" Dim mapDoc As IMapDocument = New MapDocument mapDoc.Open(path) Dim map As IMap = mapDoc.Map(0) Dim activeView As IActiveView = DirectCast(map, IActiveView) activeView.Activate(Panel1.Handle.ToInt32) m_activeView = activeView Catch ex As Exception MessageBox.Show(ex.ToString) End Try End Sub Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint If m_activeView Is Nothing Then Return m_activeView.Draw(Panel1.CreateGraphics.GetHdc.ToInt32, Nothing) End Sub End Class
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.