📄 form1.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "神龙卡双屏控件"
ClientHeight = 4965
ClientLeft = 3615
ClientTop = 3795
ClientWidth = 7005
LinkTopic = "Form1"
ScaleHeight = 4965
ScaleWidth = 7005
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 6120
Top = 3240
End
Begin VB.OptionButton Option3
Caption = "3"
Height = 375
Left = 6240
TabIndex = 10
Top = 1800
Width = 975
End
Begin VB.OptionButton Option2
Caption = "2"
Height = 375
Left = 6240
TabIndex = 9
Top = 1080
Width = 975
End
Begin VB.OptionButton Option1
Caption = "1"
Height = 375
Left = 6240
TabIndex = 8
Top = 480
Value = -1 'True
Width = 975
End
Begin VB.CheckBox Check1
Caption = "监视"
Height = 255
Left = 5280
TabIndex = 7
Top = 3360
Value = 1 'Checked
Width = 735
End
Begin VB.TextBox TextBox
Height = 300
Left = 120
TabIndex = 6
Text = "请输入视频文件路径"
Top = 3360
Width = 5055
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 6360
Top = 2400
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.mpg;*.dat;*.vob;*.avi;*.dix|*.mpg;*.dat;*.vob;*.avi;*.dix"
End
Begin VB.CommandButton Command5
Caption = "Close"
Height = 375
Left = 4920
TabIndex = 5
Top = 3840
Width = 975
End
Begin VB.CommandButton Command4
Caption = "Stop"
Height = 375
Left = 3600
TabIndex = 4
Top = 3840
Width = 975
End
Begin VB.CommandButton Command3
Caption = "Pause"
Height = 375
Left = 2400
TabIndex = 3
Top = 3840
Width = 975
End
Begin VB.CommandButton Command2
Caption = "Play"
Height = 375
Left = 1200
TabIndex = 2
Top = 3840
Width = 975
End
Begin VB.CommandButton Command1
Caption = "Open"
Height = 375
Left = 120
TabIndex = 1
Top = 3840
Width = 975
End
Begin VB.PictureBox Picture1
Height = 3135
Left = 120
ScaleHeight = 3075
ScaleWidth = 5835
TabIndex = 0
Top = 120
Width = 5895
End
Begin VB.Label LabelStates
Caption = "状态:关闭"
Height = 195
Left = 4680
TabIndex = 13
Top = 4560
Width = 1575
End
Begin VB.Label LabelTime
Caption = "进度:00:00:00"
Height = 195
Left = 2640
TabIndex = 12
Top = 4560
Width = 1455
End
Begin VB.Label LabelLen
Caption = "长度:00:00:00"
Height = 195
Left = 240
TabIndex = 11
Top = 4560
Width = 1695
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
SetVideoWatchRm Check1.Value
End Sub
Private Sub Command1_Click()
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
TextBox.Text = CommonDialog1.FileName
If OpenFileRm(TextBox.Text) >= 0 Then
Timer1.Enabled = True
PlayFileRm
End If
End If
End Sub
Private Sub Command2_Click()
PlayFileRm
End Sub
Private Sub Command3_Click()
PauseFileRm
End Sub
Private Sub Command4_Click()
StopFileRm
End Sub
Private Sub Command5_Click()
CloseFileRm
End Sub
Private Sub Form_Load()
If InitDriverRm() < 0 Then
MsgBox "没有找到解压卡,请安装神龙解压卡!"
End If
SetVideoHandleRm Picture1.hWnd
SetVideoWatchRm True
End Sub
Private Sub Form_Unload(Cancel As Integer)
Timer1.Enabled = False
FreeDriverRm
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Option1_Click()
SelectAudioChannelRm 0
End Sub
Private Sub Option2_Click()
SelectAudioChannelRm 1
End Sub
Private Sub Option3_Click()
SelectAudioChannelRm 1
End Sub
Private Sub Timer1_Timer()
Dim iFileLen, HH, MM, SS As Long
iFileLen = (GetMediaLengthRm() \ 1000)
HH = (iFileLen \ 3600)
MM = iFileLen - 3600 * HH
SS = MM Mod 60
MM = MM \ 60
LabelLen.Caption = "长度:" + CStr(HH) + ":" + CStr(MM) + ":" + CStr(SS)
iFileLen = GetPositionRm() \ 1000
HH = iFileLen \ 3600
MM = iFileLen - 3600 * HH
SS = MM Mod 60
MM = MM \ 60
LabelTime.Caption = "时间:" + CStr(HH) + ":" + CStr(MM) + ":" + CStr(SS)
HH = GetMediaStateRm()
Select Case HH
Case 0
LabelStates.Caption = "状态:打开"
Case 1
LabelStates.Caption = "状态:播放"
Case 2
LabelStates.Caption = "状态:暂停"
Case 3
LabelStates.Caption = "状态:停止"
Case 4
LabelStates.Caption = "状态:结束"
Case 5
LabelStates.Caption = "状态:关闭"
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -