求高手将以下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个回答
网易云信
2023-12-06 广告
2023-12-06 广告
网易云信提供一站式的 1 对 1 UIKit 组件库,可以更快地搭建 1 对 1 社交平台,能够快速实现音视频呼叫、音视频通话、1对1消息发送、美颜和礼物功能,直接可以复用我们的组件源码就可以了。优势:1、全套1对1 UI组件,接入更快;2...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询