📄 英译汉一.frm
字号:
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
Caption = "Form1"
ClientHeight = 10800
ClientLeft = 60
ClientTop = 450
ClientWidth = 15240
Icon = "英译汉一.frx":0000
LinkTopic = "Form1"
ScaleHeight = 10800
ScaleWidth = 15240
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "停止"
Height = 735
Left = 14040
TabIndex = 2
Top = 0
Width = 1215
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 400
Left = 12240
Top = 2640
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 735
Left = 12840
TabIndex = 0
Top = 0
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "黑体"
Size = 99.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 9495
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 4440
Width = 15135
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "一年级"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 360
TabIndex = 4
Top = 120
Width = 1305
End
Begin VB.Label Label1
Caption = $"英译汉一.frx":030A
BeginProperty Font
Name = "宋体"
Size = 24
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3495
Left = 1800
TabIndex = 3
Top = 120
Width = 8535
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'产生558个1~558的数 绝对不重复的
Private Sub Command1_Click()
Label1.Visible = False
Timer1.Enabled = True
Static num(1 To 558), c As Integer
Dim w(1 To 558) As String
'序号初始化
Dim SN(558) As Integer '序号
For kK = 1 To 558
SN(kK) = kK
Next
'初始化
For j = 1 To 558 '1~558的数
num(j) = 0
Next j
Dim s, i
Dim k
k = 1
'读出这558个单词
Open "d:\一年级\单词1.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, T
w(k) = T
k = k + 1
Loop
Close #1
'绝对不重复的
Randomize
'产生558个1~558的数
Open "d:\一年级\单词1.txt " For Random As #1
For T = 1 To 558
begin:
s = Int(Rnd() * (558 - 1 + 1)) + 1
If num(s) <> 1 Then
num(s) = 1
Else
GoTo begin:
End If
'Print s
'添加序号显示
P = SN(T) & "、" & w(s)
'合并后放到文本框中,在文本框显示出来
Text1.Text = Text1.Text & P & Chr(13) & Chr(10)
Next T
Close #1
Dim nn, yy, rr, ss, ff, mm
Dim st As String
nn = Year(Now)
yy = Month(Now)
rr = Day(Now)
ss = Hour(Now)
ff = Minute(Now)
mm = Second(Now)
st = nn & yy & rr & ss & ff & mm
'Print st
Dim fpath As String
fpath = "d:\一年级\" & st & ".txt"
Open fpath For Output As #2
Write #2, Text1.Text
Close #2
'开始后,开始按钮消失
Command1.Visible = False
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Text1.Top = Text1.Top - 200
Text1.Height = Text1.Height + 200
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -