📄 settings.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frmSetting
Caption = "设置"
ClientHeight = 3990
ClientLeft = 60
ClientTop = 450
ClientWidth = 6030
LinkTopic = "Form2"
MaxButton = 0 'False
ScaleHeight = 3990
ScaleWidth = 6030
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog comdlg
Left = 360
Top = 3240
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton cmdRestore
Caption = "恢复默认"
Height = 375
Left = 1440
TabIndex = 4
Top = 3240
Width = 975
End
Begin VB.CommandButton cmdComfirm
Caption = "确定"
Height = 375
Left = 3720
TabIndex = 3
Top = 3240
Width = 1095
End
Begin VB.Frame Frame3
Caption = "初始播放"
Height = 1095
Left = 360
TabIndex = 2
Top = 360
Width = 5295
Begin VB.ComboBox wStop
Height = 300
Left = 2160
TabIndex = 12
Text = "Z"
Top = 480
Width = 615
End
Begin VB.OptionButton note
Caption = "Option2"
Height = 255
Left = 4200
TabIndex = 9
Top = 480
Width = 255
End
Begin VB.OptionButton wordlib
Caption = "Option1"
Height = 255
Left = 3240
TabIndex = 7
Top = 480
Value = -1 'True
Width = 255
End
Begin VB.ComboBox wStart
Height = 300
Left = 960
TabIndex = 5
Text = "A"
Top = 480
Width = 615
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "至"
Height = 180
Left = 1800
TabIndex = 11
Top = 600
Width = 180
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备忘库"
Height = 180
Left = 4560
TabIndex = 10
Top = 480
Width = 540
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "词库"
Height = 255
Left = 3600
TabIndex = 8
Top = 480
Width = 495
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "首字母"
Height = 180
Left = 240
TabIndex = 6
Top = 480
Width = 540
End
End
Begin VB.Frame Frame2
Caption = "速度"
Height = 1335
Left = 3120
TabIndex = 1
Top = 1560
Width = 2535
Begin VB.ComboBox speet
Height = 300
Left = 960
TabIndex = 13
Text = "1"
Top = 600
Width = 615
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "间隔"
Height = 255
Left = 240
TabIndex = 16
Top = 600
Width = 495
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "秒"
Height = 255
Left = 1800
TabIndex = 15
Top = 600
Width = 255
End
End
Begin VB.Frame Frame1
Caption = "颜色"
Height = 1335
Left = 360
TabIndex = 0
Top = 1560
Width = 2415
Begin VB.Label colorSet
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "颜色"
BeginProperty Font
Name = "宋体"
Size = 36
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 735
Left = 480
TabIndex = 14
ToolTipText = "单击设置颜色"
Top = 360
Width = 1575
End
End
End
Attribute VB_Name = "frmSetting"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdComfirm_Click()
Dim spt As Single
CONFSTR.speet = speet.Text
spt = CInt(Trim(CONFSTR.speet))
If spt < 1 Or spt > 10 Then
CONFSTR.speet = 1
End If
CONFSTR.wordstart = wStart.Text
CONFSTR.wordstop = wStop.Text
Dim ws As String, wst As String
ws = CInt(Asc(UCase(Trim(CONFSTR.wordstart))))
wst = CInt(Asc(UCase(Trim(CONFSTR.wordstop))))
If ws < 65 Or ws > 90 Then CONFSTR.wordstart = "A"
If wst < 65 Or wst > 90 Then CONFSTR.wordstop = "Z"
writeConfig CONFSTR
Call initMainForm
Unload Me
End Sub
Private Sub Form_Load()
Call loadConfig
Call styleInit
comdlg.Flags = cdlCCRGBInit
For i = 65 To 90
wStart.AddItem (Chr(i))
wStop.AddItem (Chr(i))
Next
For i = 1 To 10
speet.AddItem i
Next
End Sub
Private Sub colorSet_Click()
Dim stylecolor
comdlg.ShowColor
stylecolor = comdlg.Color
If stylecolor <> 0 Then
colorSet.BackColor = stylecolor
Me.BackColor = stylecolor
Frame1.BackColor = stylecolor
Frame2.BackColor = stylecolor
Frame3.BackColor = stylecolor
Else
stylecolor = &H8000000F
End If
CONFSTR.stylecolor = stylecolor
End Sub
Private Sub cmdRestore_Click()
Call setDefault
Call styleInit
End Sub
Private Sub styleInit()
Me.BackColor = Trim(CONFSTR.stylecolor)
Frame1.BackColor = Trim(CONFSTR.stylecolor)
Frame2.BackColor = Trim(CONFSTR.stylecolor)
Frame3.BackColor = Trim(CONFSTR.stylecolor)
wStart.Text = Trim(CONFSTR.wordstart)
wStop.Text = Trim(CONFSTR.wordstop)
speet.Text = Trim(CONFSTR.speet)
colorSet.BackColor = Trim(CONFSTR.stylecolor)
initlib = Trim(CONFSTR.initlib)
If initlib = "words" Then
wordlib.Value = True
ElseIf initlib = "specialWords" Then
note.Value = True
End If
End Sub
Private Sub note_Click()
CONFSTR.initlib = "specialWords"
End Sub
Private Sub wordlib_Click()
CONFSTR.initlib = "words"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -