Прежде всего, позвольте мне предоставить вам мой код:
Private Sub txtLatMin_Exit(ByVal Cancel As ReturnBoolean)
Dim i_SelStart As Long
Dim str_Prompt As String
'Save the cursor position.
i_SelStart = txtLatMin.SelectionStart
'Remove characters that we can't use.
txtLatMin.Text = NumericPortion(txtLatMin.Text, True)
'Enforce the maximums:
If Val(txtLatMin.Text) + Val(txtLatSec.Text) / 60 >= 60 Then
str_Prompt = "The maximum number of latitude minutes is 59.999."
MsgBox(str_Prompt, vbExclamation, "Notification")
Cancel = True
ElseIf Val(Me.textbox_Latitude_Degrees.Text) + Val(txtLatMin.Text) / 60 + Val(txtLatSec.Text) / 3600 > 89.99 Then
str_Prompt = "The maximum number of latitude degrees is 89.99."
MsgBox(str_Prompt, vbExclamation, "Notification")
Cancel = True
End If
'Restore the cursor position.
txtLatMin.SelectionStart = i_SelStart
End Sub
В этом сообщении отмечается ошибка в Отмена = Истина
Помните, что я конвертирую код из VB6 в VB.NET
Будут ли какие-либо предложения, которые кто-нибудь может мне дать?