MACROS AND VISUAL BASIC
LSM 710 and LSM 780
Carl Zeiss
VBA PROGRAMMING FOR LSM
Systems
48 M60-1-0025
e
02/2010
5.2.2.6
Events
- What are Events good for?
- Mouse Events
- Scan state events
- Hardware Events
Private Sub Lsm5VbaDoc_SystemEvent(ByVal EventNr As Long, ByVal Param As Variant)
Dim x As Long
Dim y As Long
Dim z As Long
Dim t As Long
Dim c As Long
Dim tmp As Long
Dim pt As POINT
Dim dsDoc As DsRecordingDoc
‘get the active Recording Document
Set dsDoc = Lsm5.DsRecordingActiveDocObject
If (dsDoc Is Nothing) Then Exit Sub
If (Not dsDoc.IsValid) Then Exit Sub
If (EventNr = eImageWindowLeftButtonDownEvent) Then
If dsDoc.GetCurrentMousePosition(c, t, z, y, x) <> 0 Then
‘do something
.
.
.
End If
End If
End Sub