Running the following plugin creates an AmwFileRead event handler. Each time Amos Graphics reads an AMW file, the event handler displays the file's name in a message box.
Imports Microsoft.VisualBasic
Imports Amos
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
AddHandler pd.AmwFileRead, AddressOf AmwFileRead
MsgBox("AmwFileRead Event Example is now installed.")
End Function
Private Sub AmwFileRead(ByVal FileName As String)
MsgBox(FileName & " has just been read.")
End Sub
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class