英语翻译Sub capt(ii As Integer)S = "asdfghjklqwertyuiopzxcvbnm1234567890"If (ii = 5) ThenFor i = 0 To 4i2 = Int(Rnd(Len(S) - 1) * Len(S) + 1)ss = Mid(S,i2,1)Label1(i).Caption = ssNext iElsei3 = Int(Rnd(Len(S) - 1) * Len(S) + 1)ss = Mid(S,i3,1)Lab

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/30 11:03:52
英语翻译Sub capt(ii As Integer)S =
x[OAv[D%jjJ,"Kw'@NiMڤ*fgwy/tvWjI偝9s朙o9`ld僜T0D@ 1= O4P_2|hr7C6`X[Z𰹡 ԹvJa;8f@ &6JdiɰL;wk=42BL:)749 aAx l ^ԪUjM'0 BS +hqTh!TYƝ]=, :&_p 1j8@bis(/3ڀ.H٥cz܊0S;Ky G;K?Q}n2ÏA_G3edt7T\uSq:(!< 5LX]Wp',zNM G]=>cn.JA&W 𲩖2JX #Roy^1O'GGOJ:I]ڇ8p+xͥr~ {|~6Ƴ~VK8L&[Sg J$NL9ȫ f[`@B$%^̋GO [KKh?#o\.1E7+k˅ٟtJZ-c(5#n4Y]sB!U={Q-{19Nw˹[AP9"g/Y` qCNx[)e%(5)z?o/Ԫ~UM7 G{ bP ̊I# hlKFh?*Qrڄv \l$Ž4"#hbBb#n

英语翻译Sub capt(ii As Integer)S = "asdfghjklqwertyuiopzxcvbnm1234567890"If (ii = 5) ThenFor i = 0 To 4i2 = Int(Rnd(Len(S) - 1) * Len(S) + 1)ss = Mid(S,i2,1)Label1(i).Caption = ssNext iElsei3 = Int(Rnd(Len(S) - 1) * Len(S) + 1)ss = Mid(S,i3,1)Lab
英语翻译
Sub capt(ii As Integer)
S = "asdfghjklqwertyuiopzxcvbnm1234567890"
If (ii = 5) Then
For i = 0 To 4
i2 = Int(Rnd(Len(S) - 1) * Len(S) + 1)
ss = Mid(S,i2,1)
Label1(i).Caption = ss
Next i
Else
i3 = Int(Rnd(Len(S) - 1) * Len(S) + 1)
ss = Mid(S,i3,1)
Label1(ii).Caption = ss
End If
End Sub
Private Sub Command1_Click()
If Command1.Caption = "停止" Then
Command1.Caption = "继续"
Timer2.Enabled = False
Else
Command1.Caption = "停止"
Timer2.Enabled = True
End If
End Sub
Private Sub Command1_KeyDown(KeyCode As Integer,Shift As Integer)
For i = 0 To 4
If LCase(Trim(Label1(i).Caption)) = LCase(Chr(KeyCode)) Then
j = Int(Rnd(Form1.Width) * Form1.Width + 1)
Label1(i).Top = 0
Label1(i).Width = j
capt (i)
Label2.Caption = Int(Label2.Caption) + 1
End If
Next i
End Sub
Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer)
For i = 0 To 4
If LCase(Trim(Label1(i).Caption)) = LCase(Chr(KeyCode)) Then
j = Int(Rnd(Form1.Width) * Form1.Width + 1)
Label1(i).Top = 0
Label1(i).Width = j
capt (i)
Label2.Caption = Int(Label2.Caption) + 1
End If
Next i
End Sub
Private Sub Form_Load()
capt (5)
End Sub
Private Sub Timer2_Timer()
For i = 0 To 4
Label1(i).Top = Label1(i).Top + 100
If (Label1(i).Top >= Form1.Height) Then
j = Int(Rnd(Form1.Width) * Form1.Width + 1)
Label1(i).Top = 0
Label1(i).Width = j
capt (i)
End If
Next i
End Sub
---------------------------------
高手来下哈...

英语翻译Sub capt(ii As Integer)S = "asdfghjklqwertyuiopzxcvbnm1234567890"If (ii = 5) ThenFor i = 0 To 4i2 = Int(Rnd(Len(S) - 1) * Len(S) + 1)ss = Mid(S,i2,1)Label1(i).Caption = ssNext iElsei3 = Int(Rnd(Len(S) - 1) * Len(S) + 1)ss = Mid(S,i3,1)Lab
Sub capt(ii As Integer) '自定义过程
S = "asdfghjklqwertyuiopzxcvbnm1234567890" '变量s值
If (ii = 5) Then '如果ii=5 则执行for循环
For i = 0 To 4
i2 = Int(Rnd(Len(S) - 1) * Len(S) + 1) '1到变量s字符长度区间随机选取一个数
ss = Mid(S, i2, 1) '从s里截取位置(随机数i2)的字符赋值给ss
Label1(i).Caption = ss 'ss值赋值给 标签
Next i
Else
i3 = Int(Rnd(Len(S) - 1) * Len(S) + 1) '同上
ss = Mid(S, i3, 1)
Label1(ii).Caption = ss
End If
End Sub
Private Sub Command1_Click()
If Command1.Caption = "停止" Then
Command1.Caption = "继续"
Timer2.Enabled = False
Else
Command1.Caption = "停止"
Timer2.Enabled = True
End If
End Sub
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
For i = 0 To 4
If LCase(Trim(Label1(i).Caption)) = LCase(Chr(KeyCode)) Then 'lcase转换大小写
j = Int(Rnd(Form1.Width) * Form1.Width + 1)
Label1(i).Top = 0
Label1(i).Width = j
capt (i) '调用过程capt
Label2.Caption = Int(Label2.Caption) + 1
End If
Next i
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
For i = 0 To 4
If LCase(Trim(Label1(i).Caption)) = LCase(Chr(KeyCode)) Then
j = Int(Rnd(Form1.Width) * Form1.Width + 1)
Label1(i).Top = 0
Label1(i).Width = j
capt (i)
Label2.Caption = Int(Label2.Caption) + 1
End If
Next i
End Sub
Private Sub Form_Load()
capt (5)
End Sub
Private Sub Timer2_Timer()
For i = 0 To 4
Label1(i).Top = Label1(i).Top + 100 '标签上边距+100
If (Label1(i).Top >= Form1.Height) Then '如果超过窗体高度
j = Int(Rnd(Form1.Width) * Form1.Width + 1)
Label1(i).Top = 0
Label1(i).Width = j
capt (i)
End If
Next i
End Sub
其他都很简单.应该不会不懂吧.