求高手将以下vb6.0代码转化为vb.net可执行源码,急用 30
OptionExplicitPrivateSubCommand1_Click()IfText5.Text=Text2.TextThenMsgBox"恭喜您,顺利通过验证"...
Option Explicit
Private Sub Command1_Click()
If Text5.Text = Text2.Text Then
MsgBox "恭喜您,顺利通过验证", , "= ="
Else
MsgBox "出错啦", , "= ="
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text2.Text = ""
Dim strlen As Long
Dim i, j As Long
Dim num() As Variant
Dim sn() As Integer
strlen = Len(Text1.Text)
ReDim num(1 To strlen)
ReDim sn(1 To strlen)
For i = 1 To strlen
num(i) = Mid(Text1.Text, i, 1)
Randomize
restart: sn(i) = CInt((Rnd * (strlen - 1)) + 1)
For j = 1 To strlen
If i = j Then GoTo jump
If sn(j) = sn(i) Then
GoTo restart
End If
jump: Next j
Next i
For i = 1 To strlen
Text2.Text = Text2.Text + num(sn(i))
Next i
End Sub
Private Sub Label4_Click()
Text2.Text = ""
Dim strlen As Long
Dim i, j As Long
Dim num() As Variant
Dim sn() As Integer
strlen = Len(Text1.Text)
ReDim num(1 To strlen)
ReDim sn(1 To strlen)
For i = 1 To strlen
num(i) = Mid(Text1.Text, i, 1)
Randomize
restart: sn(i) = CInt((Rnd * (strlen - 1)) + 1)
For j = 1 To strlen
If i = j Then GoTo jump
If sn(j) = sn(i) Then
GoTo restart
End If
jump: Next j
Next i
For i = 1 To strlen
Text2.Text = Text2.Text + num(sn(i))
Next i
End Sub
Private Sub Timer1_Timer()
Label5.Caption = Text2.Text
End Sub 展开
Private Sub Command1_Click()
If Text5.Text = Text2.Text Then
MsgBox "恭喜您,顺利通过验证", , "= ="
Else
MsgBox "出错啦", , "= ="
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text2.Text = ""
Dim strlen As Long
Dim i, j As Long
Dim num() As Variant
Dim sn() As Integer
strlen = Len(Text1.Text)
ReDim num(1 To strlen)
ReDim sn(1 To strlen)
For i = 1 To strlen
num(i) = Mid(Text1.Text, i, 1)
Randomize
restart: sn(i) = CInt((Rnd * (strlen - 1)) + 1)
For j = 1 To strlen
If i = j Then GoTo jump
If sn(j) = sn(i) Then
GoTo restart
End If
jump: Next j
Next i
For i = 1 To strlen
Text2.Text = Text2.Text + num(sn(i))
Next i
End Sub
Private Sub Label4_Click()
Text2.Text = ""
Dim strlen As Long
Dim i, j As Long
Dim num() As Variant
Dim sn() As Integer
strlen = Len(Text1.Text)
ReDim num(1 To strlen)
ReDim sn(1 To strlen)
For i = 1 To strlen
num(i) = Mid(Text1.Text, i, 1)
Randomize
restart: sn(i) = CInt((Rnd * (strlen - 1)) + 1)
For j = 1 To strlen
If i = j Then GoTo jump
If sn(j) = sn(i) Then
GoTo restart
End If
jump: Next j
Next i
For i = 1 To strlen
Text2.Text = Text2.Text + num(sn(i))
Next i
End Sub
Private Sub Timer1_Timer()
Label5.Caption = Text2.Text
End Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询