SingleToLong example
Example for SingleToLong method
Private Sub CAvax1_OnMouseMove(ByVal Sender As Object, ByVal e As Avax.cAvax.MouseMoveEventArgs) Handles CAvax1.OnMouseMove
Dim xMinSel, yMinSel As Single
Dim xMaxSel, yMaxSel As Single
Dim xL1, yL1 As Integer
Dim xL2, yL2 As Integer
Dim xC, yC As Integer
Dim sMsg As String
If cAvax1.GetBoundsSelectBox(xMinSel, yMinSel, xMaxSel, yMaxSel) = True Then
Call cAvax1.SingleToLong(xMinSel, yMinSel, xL1, yL1)
Call cAvax1.SingleToLong(xMaxSel, yMaxSel, xL2, yL2)
xC = xL1 + (xL2 - xL1) / 2
yC = yL1 + (yL2 - yL1) / 2
End If
If e.x = xC And e.y = yC Then
sMsg = "The center of the select box cursor has the same "
sMsg = sMsg & "window coordinates with the mouse pointer"
End If
Label1.Text = sMsg
End Sub
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
cAvax1.StartAvax()
End Sub
Private Sub Form1_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
cAvax1.EndAvax()
End Sub