Post by Carl on Feb 4, 2020 16:02:49 GMT 8
Dim lsRegCode As String
Dim lsActCode As String
lsRegCode = Me.RegCodeTextBox.Text
lsActCode = Me.ActivationCodeTextBox.Text
If Len(lsActCode) <> Len(lsRegCode) Then
MsgBox("Activation Code is not valid! (Check Level = 1)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
End If
If lsAppCode <> gsAppCode Then
MsgBox("Activation Code is not valid! (Check Level = 2)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
End If
If lsHDSerial <> gsHDSerial Then
MsgBox("Activation Code is not valid! (Check Level = 3)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
End If
If lsExpDate = "LIFETIME" Then
Me.ExpDateTextBox.Text = "Lifetime License"
My.Settings.ProgramExpired = False
Else
lsExpDate = Mid(lsExpDate, 5, 2) + "/" + Mid(lsExpDate, 7, 2) + "/" + Mid(lsExpDate, 1, 4)
If Not IsDate(lsExpDate) Then
MsgBox("Activation Code is not valid! (Check Level = 4)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
Else
Me.ExpDateTextBox.Text = Format(CDate(lsExpDate), "MMMM dd, yyyy")
If CDate(lsExpDate) >= Now.Date Then
My.Settings.ProgramExpired = False
Else
My.Settings.ProgramExpired = True
End If
End If
End If
Dim lsActCode As String
lsRegCode = Me.RegCodeTextBox.Text
lsActCode = Me.ActivationCodeTextBox.Text
If Len(lsActCode) <> Len(lsRegCode) Then
MsgBox("Activation Code is not valid! (Check Level = 1)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
End If
If lsAppCode <> gsAppCode Then
MsgBox("Activation Code is not valid! (Check Level = 2)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
End If
If lsHDSerial <> gsHDSerial Then
MsgBox("Activation Code is not valid! (Check Level = 3)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
End If
If lsExpDate = "LIFETIME" Then
Me.ExpDateTextBox.Text = "Lifetime License"
My.Settings.ProgramExpired = False
Else
lsExpDate = Mid(lsExpDate, 5, 2) + "/" + Mid(lsExpDate, 7, 2) + "/" + Mid(lsExpDate, 1, 4)
If Not IsDate(lsExpDate) Then
MsgBox("Activation Code is not valid! (Check Level = 4)", MsgBoxStyle.Exclamation, Application.ProductName)
OK_Button.Text = " Save Activation"
OK_Button.Image = My.Resources.disk
Cancel_Button.Enabled = False
ActivationCodeTextBox.ReadOnly = False
ActivationCodeTextBox.BackColor = Color.White
ActivationCodeTextBox.Text = ""
ActivationCodeTextBox.Focus()
Exit Sub
Else
Me.ExpDateTextBox.Text = Format(CDate(lsExpDate), "MMMM dd, yyyy")
If CDate(lsExpDate) >= Now.Date Then
My.Settings.ProgramExpired = False
Else
My.Settings.ProgramExpired = True
End If
End If
End If