📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 735
Left = 840
TabIndex = 3
Top = 1560
Width = 615
End
Begin VB.TextBox Text1
Height = 615
Left = 1680
TabIndex = 2
Text = "99"
Top = 1800
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "Command2"
Default = -1 'True
Height = 855
Left = 960
TabIndex = 1
Top = 600
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 735
Left = 3720
TabIndex = 0
Top = 840
Width = 3375
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Cls
Dim strTem As String
Dim intTem As Integer
Dim i As Integer
Dim str(3) As String
Do
intTem = Int(Rnd * (3 - 0 + 1)) + 0
If InStr(1, strTem, CStr(intTem)) = 0 Then
strTem = strTem & CStr(intTem)
i = i + 1
If i > 3 Then Exit Do
End If
Loop
Print strTem
intTem = Len(strTem)
MsgBox intTem
str(0) = Mid(strTem, 1, 1)
str(1) = Mid(strTem, 2, 1)
str(2) = Mid(strTem, 3, 1)
str(3) = Mid(strTem, 4, 1)
For i = 0 To 3
Print str(i)
Next i
End Sub
Private Sub Command2_Click()
Dim s, i
i = 0
Open App.Path & "\英语题库.txt" For Input As #1
Do While Not EOF(1) And i < 1421
Input #1, s
i = i + 1
Loop
MsgBox s
'lab.Caption = s(0)
Close #1
End Sub
Private Sub Command3_Click()
Dim s, total
total = 0
Open App.Path & "\英语题库.txt" For Input As #1
Do Until EOF(1)
total = total + 1
Input #1, s
Loop
Close
MsgBox total
' Call dcrnd
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -