📄 form2.frm
字号:
TabIndex = 19
Top = 6480
Width = 255
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "慢"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8760
TabIndex = 18
Top = 6480
Width = 255
End
Begin MediaPlayerCtl.MediaPlayer MediaPlayer1
Height = 615
Left = 120
TabIndex = 14
Top = 7560
Width = 5055
AudioStream = -1
AutoSize = 0 'False
AutoStart = -1 'True
AnimationAtStart= -1 'True
AllowScan = -1 'True
AllowChangeDisplaySize= -1 'True
AutoRewind = 0 'False
Balance = 0
BaseURL = ""
BufferingTime = 5
CaptioningID = ""
ClickToPlay = -1 'True
CursorType = 0
CurrentPosition = -1
CurrentMarker = 0
DefaultFrame = ""
DisplayBackColor= 0
DisplayForeColor= 16777215
DisplayMode = 0
DisplaySize = 4
Enabled = -1 'True
EnableContextMenu= -1 'True
EnablePositionControls= -1 'True
EnableFullScreenControls= 0 'False
EnableTracker = -1 'True
Filename = ""
InvokeURLs = -1 'True
Language = -1
Mute = 0 'False
PlayCount = 1
PreviewMode = 0 'False
Rate = 1
SAMILang = ""
SAMIStyle = ""
SAMIFileName = ""
SelectionStart = -1
SelectionEnd = -1
SendOpenStateChangeEvents= -1 'True
SendWarningEvents= -1 'True
SendErrorEvents = -1 'True
SendKeyboardEvents= 0 'False
SendMouseClickEvents= 0 'False
SendMouseMoveEvents= 0 'False
SendPlayStateChangeEvents= -1 'True
ShowCaptioning = 0 'False
ShowControls = -1 'True
ShowAudioControls= -1 'True
ShowDisplay = 0 'False
ShowGotoBar = 0 'False
ShowPositionControls= -1 'True
ShowStatusBar = 0 'False
ShowTracker = -1 'True
TransparentAtStart= 0 'False
VideoBorderWidth= 0
VideoBorderColor= 0
VideoBorder3D = 0 'False
Volume = -40
WindowlessVideo = 0 'False
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Text1 = 0
MediaPlayer1.FileName = Combo1.Text
Text6 = Combo1.Text
End Sub
Private Sub Command3_Click()
MediaPlayer1.CurrentPosition = Text1
End Sub
Private Sub Command2_Click()
Data1.Recordset.FindLast "sound like" & Chr$(39) & "jd*" & Chr$(39)
End Sub
Private Sub Check1_Click()
If Check1.Value = 0 Then
Text3.Visible = False
Else
Text3.Visible = True
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 0 Then
Text4.Visible = False
Else
Text4.Visible = True
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
Text5 = Text1
Timer2.Enabled = True
Timer1.Enabled = False
Else
Timer2.Enabled = False
Timer1.Enabled = True
End If
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
Data1.Recordset.MoveFirst
mbDataChanged = False
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
Data1.Recordset.MoveLast
mbDataChanged = False
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
If Not Data1.Recordset.EOF Then Data1.Recordset.MoveNext
If Data1.Recordset.EOF And Data1.Recordset.RecordCount > 0 Then
Beep
'已到最后返回
Data1.Recordset.MoveLast
End If
'显示当前记录
mbDataChanged = False
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
If Not Data1.Recordset.BOF Then Data1.Recordset.MovePrevious
MediaPlayer1.CurrentPosition = Text1
If Data1.Recordset.BOF And Data1.Recordset.RecordCount > 0 Then
Beep
'已到最后返回
Data1.Recordset.MoveFirst
End If
'显示当前记录
mbDataChanged = False
Exit Sub
GoPrevError:
MsgBox Err.Description
End Sub
Private Sub HScroll1_Change()
Text9 = HScroll1.Value / 100
End Sub
Private Sub Text1_Change()
Text5 = Text1
End Sub
Private Sub Text6_Change()
MediaPlayer1.FileName = Text6
Text9 = HScroll1.Value / 100
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Data1.Recordset.FindFirst "sound like" & Chr$(39) & "jd" & Text7 & ".mp3" & Chr$(39)
End Sub
Private Sub Text8_Change()
If Text8 = 0 Then
Call cmdNext_Click
Text8 = VScroll1.Value
End If
End Sub
Private Sub Timer1_Timer()
MediaPlayer1.Rate = Text9
If MediaPlayer1.CurrentPosition / MediaPlayer1.Rate < Text1.Text Then Data1.Recordset.MovePrevious
If MediaPlayer1.CurrentPosition / MediaPlayer1.Rate >= Text2.Text Then Data1.Recordset.MoveNext
End Sub
Private Sub Timer2_Timer()
If MediaPlayer1.CurrentPosition >= Text2.Text Then
MediaPlayer1.CurrentPosition = Text5
Text8 = Text8 - 1
End If
End Sub
Private Sub Timer3_Timer()
If MediaPlayer1.CurrentPosition = MediaPlayer1.SelectionEnd Then
Timer1.Enabled = False
Text9 = 1
MediaPlayer1.Rate = 1
MediaPlayer1.CurrentPosition = Text1
Timer1.Enabled = True
End If
End Sub
Private Sub VScroll1_Change()
Text8 = VScroll1.Value
End Sub
Private Sub VScroll2_Change()
MediaPlayer1.Rate = VScroll2.Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -