COM API: Events

steve clark
Member Posts: 3,591 ✭✭✭
Comments
-
steve clark said:
Has anyone used the events
YES. (Works fine in Microsoft Visual Basic 2010 Express)
Somewhere you need to "connect" your sub routine to the actual event in question. In VB 2010 and related, you say that it handles something.
So, the key lines in VB are something like:
Private launcher As LogosLauncher
Private WithEvents app As LogosApplicationlauncher = New LogosLauncher
app = launcher.ApplicationPrivate Sub app_PanelClosed(ByVal rawPanel As Object) Handles app.PanelClosed
Dim panel As LogosPanel = CType(rawPanel, LogosPanel)
' *** BACKGROUND THREAD EVENT PROCESSING **
' ... Do SOMETHING USEFUL HERE ...
End Sub0 -