VB code for listening to the events of IMapFrameEvents:
[Visual Basic 6.0]
Dim WithEvents m_pMapFrameEvents As MapFrame
Sub SetEvents()
Dim pDoc As IMxDocument, pPageLayout As IPageLayout
Dim pCont As IGraphicsContainer, pElement As IElement
Set pDoc = ThisDocument
Set pPageLayout = pDoc.PageLayout
Set pCont = pPageLayout
pCont.Reset
Set pElement = pCont.Next
If TypeOf pElement Is IMapFrame Then
Set m_pMapFrameEvents = pElement
End If
End Sub
Private Sub m_pMapFrameEvents_MapFrameResized()
MsgBox "MapFrame resized"
End Sub
[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button
in the upper-left corner of the page.