AutoOSnapType example
Example for AutoOSnapType event
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Call CAvax1.StartAvax()
Dim AutoOsnapStatus As Integer
AutoOsnapStatus = Avax.AvaxOSnapType.Endpoint_o
Call CAvax1.SetAvaxProperty(Avax.AvaxProp.AutoOSnap_p, AutoOsnapStatus)
Call CAvax1.Add_Line(0, 0, 10, 10, 10, 0)
End Sub
Private Sub Form1_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
Call cAvax1.EndAvax()
End Sub
Private Sub cAvax1_AutoOSnapType(Sender As System.Object, e As Avax.cAvax.AutoOSnapTypeEventArgs) Handles cAvax1.AutoOSnapType
If e.OSnapType = Avax.AvaxOSnapType.Endpoint_o Then
e.fCancel = True
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CAvax1.Command = Avax.AvaxCommand.Line_c
End Sub
Private Sub CAvax1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CAvax1.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
CAvax1.Command = Avax.AvaxCommand.Cancel_c
End If
End Sub