?? forfrm.frm
字號:
_Version = 393216
Orientation = 1
LargeChange = 50
SmallChange = 20
Min = -100
Max = 100
TickStyle = 2
TickFrequency = 20
End
Begin MSComctlLib.Slider SBalance
Height = 720
Left = 240
TabIndex = 9
Top = 480
Width = 1095
_ExtentX = 1931
_ExtentY = 1270
_Version = 393216
LargeChange = 100
SmallChange = 40
Min = -100
Max = 100
TickFrequency = 40
End
Begin VB.Label Label4
Caption = "低"
Height = 255
Left = 1200
TabIndex = 15
Top = 2640
Width = 255
End
Begin VB.Label Label3
Caption = "高"
Height = 255
Left = 1200
TabIndex = 14
Top = 1200
Width = 255
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "音量"
Height = 255
Left = 120
TabIndex = 13
Top = 1200
Width = 495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "左 均衡 右"
Height = 255
Left = 120
TabIndex = 10
Top = 240
Width = 1575
End
End
Begin VB.Frame Frame1
Caption = "播放"
Height = 1215
Left = 2280
TabIndex = 3
Top = 480
Width = 1935
Begin VB.TextBox NumText
BeginProperty DataFormat
Type = 1
Format = "0;(0)"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 270
Index = 0
Left = 840
MaxLength = 3
TabIndex = 6
Text = "1"
ToolTipText = "1-999"
Top = 360
Width = 375
End
Begin VB.OptionButton InTurnO
Caption = "播放 次"
Height = 495
Index = 0
Left = 120
TabIndex = 5
Top = 240
Value = -1 'True
Width = 1575
End
Begin VB.OptionButton InTurnO
Caption = "始終重復(fù)"
Height = 255
Index = 1
Left = 120
TabIndex = 4
Top = 720
Width = 1455
End
End
Begin VB.Frame Frame4
Height = 975
Left = 2280
TabIndex = 16
Top = 1560
Width = 1935
End
End
End
Attribute VB_Name = "ForFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim ChangeNum(4) As String '定義縮放模式
Dim CurframePos As Double '確定目前位置
Dim CurTimePos As Double '確定目前時間
Dim CurrRate As Double '正確比率
Dim CNum As Boolean '是否是數(shù)字判定
Dim OldString As String '數(shù)字暫時存儲
Private Sub Check1_Click(Index As Integer) '變動則應(yīng)用為真
Command3.Enabled = True
End Sub
Private Sub Check2_Click() '靜音
Command3.Enabled = True '變動則應(yīng)用為真
If Check2.Value = 0 Then
SVolumn.Enabled = True '音量可調(diào)節(jié)
Else
SVolumn.Enabled = False
End If
End Sub
Private Sub Combo1_Click()
If Combo1.ListIndex <> 4 Then Command3.Enabled = True '變動則應(yīng)用為真
End Sub
Private Sub Command1_Click() '確定
Command3_Click
Showfrm.Media1.Play
Unload Me '退出窗體
End Sub
Private Sub Command2_Click()
Unload Me '退出
End Sub
Private Sub Command3_Click() '應(yīng)用
On Error Resume Next
With Showfrm.Media1
'Set to pro to media
.Balance = SBalance.Value * 100 '返回聲音量
.AutoRewind = Check1(0).Value '返回是否自動倒帶
.AutoStart = Check1(1).Value '是否自動播放
If Check2.Value = 1 Then '是否靜音
.Volume = -4000
Else '非靜音返回值
.Volume = -(SVolumn.Value * 20 + 2000)
End If
If InTurnO(1).Value Then '播放次數(shù)
.PlayCount = 0
Else
.PlayCount = CInt(NumText(0).Text)
End If
If CurrRate = 0 Then CurrRate = 1 '播放比率
.Rate = CurrRate
CurTime = ConScroll.Value '快進(jìn)幅度存儲
If JumpTCheck.Value = 1 Then '確定播放的位置
If CInt(NumText(1).Text) * 60 > EndTimePos Then
.CurrentPosition = EndTimePos
Else
.CurrentPosition = CInt(NumText(1).Text) * 60
End If
End If
End With
OldVolumn = SVolumn.Value
'變更屏幕大小
If Combo1.ListIndex <> 4 Then ChangeSize (Combo1.ListIndex)
End Sub
Private Sub ConScroll_Change()
Command3.Enabled = True
ControlText.Text = ConScroll.Value '返回值
End Sub
Private Sub Form_Load() '初試
Dim I As Integer
'start to set combo1.list
On Error Resume Next
ChangeNum(0) = "50%"
ChangeNum(1) = "100%"
ChangeNum(2) = "200%"
ChangeNum(3) = "全屏幕"
ChangeNum(4) = "自定義"
For I = 0 To 4
Combo1.AddItem ChangeNum(I)
Next I
Combo1.ListIndex = 4
With Showfrm.Media1 '
'開始設(shè)置桌面一
SBalance.Value = CInt(.Balance / 100) '
If .AutoRewind Then '
Check1(0).Value = 1
Else
Check1(0).Value = 0
End If
If .AutoStart Then
Check1(1).Value = 1
Else
Check1(1).Value = 0
End If
SVolumn.Value = OldVolumn '
If .Volume = -4000 Then
Check2.Value = 1
SVolumn.Enabled = False
Else
Check2.Value = 0
SVolumn.Enabled = True
End If
If .PlayCount = 0 Then
InTurnO(1).Value = True
Else
NumText(0).Text = .PlayCount
InTurnO(0).Value = True
End If
End With
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
DeleteObject CurTimePos
DeleteObject CurrRate
DeleteObject CNum
DeleteObject CurframePos
End Sub
Private Sub InTurnO_Click(Index As Integer)
On Error Resume Next
If Index = 1 Then '
NumText(0).Enabled = False
NumText(0).BackColor = &H8000000F
InTurnO(0).Value = False
Else
NumText(0).Enabled = True
NumText(0).BackColor = &HFFFFFF
End If
Command3.Enabled = True
End Sub
Private Sub SBalnce_Change()
Command3.Enabled = True
End Sub
Private Sub JumpTCheck_Click() '切換
Command3.Enabled = True
If JumpTCheck.Value = 1 Then
NumText(1).Enabled = True
NumText(1).BackColor = &H80000005
Else
NumText(1).Enabled = False
NumText(1).BackColor = &H8000000F
End If
End Sub
Private Sub NumText_KeyPress(Index As Integer, KeyAscii As Integer)
On Error Resume Next
Command3.Enabled = True
If KeyAscii > 57 Then '非數(shù)字不做處理
CNum = False
ElseIf KeyAscii < 48 Then
If KeyAscii = 8 Then '刪除鍵按下
CNum = True
Else
CNum = False
End If
Else
CNum = True '0-9按下
End If
End Sub
Private Sub NumText_Change(Index As Integer) '數(shù)字接受控制
On Error Resume Next
If CNum Then '
OldString = NumText(Index).Text
Else
NumText(Index).Text = OldString
End If
If NumText(Index).Text = "" Or NumText(Index).Text = "0" Then NumText(Index).Text = "1" '自動更新為 1
End Sub
Private Sub ProTab_Click(PreviousTab As Integer) '初試顯示屬性2
On Error Resume Next
'start to set Controls in Tab 2
With Showfrm.Media1
If .DisplayMode = mpFrames Then
CurframePos = .CurrentPosition
.DisplayMode = mpTime
CurTimePos = .CurrentPosition
.DisplayMode = mpFrames
Else
CurTimePos = .CurrentPosition
.DisplayMode = mpFrames
CurframePos = .CurrentPosition
.DisplayMode = mpTime
End If
InfoText(0) = CStr(CurframePos)
InfoText(1) = CStr(CurTimePos)
InfoText(2) = CSng((EndFramePos / EndTimePos * 100) / 100)
If CurframePos = 0 Or CurTimePos = 0 Then
InfoText(3) = "0"
Else
InfoText(3) = CSng((CurframePos / CurTimePos * 100) / 100)
End If
Select Case .Rate '比率反饋
Case 1
RateOp(0).Value = True
Case 1.3
RateOp(1).Value = True
Case 1.7
RateOp(2).Value = True
Case 2
RateOp(3).Value = True
End Select '自動幫助
NumText(1).ToolTipText = "1---" + CStr(CInt(Int(EndTimePos + 0.5) / 60))
AdverLabel(3).ToolTipText = "1---" + CStr(CInt(Int(EndTimePos + 0.5) / 60))
ControlText.Text = CurTime
End With
End Sub
Private Sub RateOp_Click(Index As Integer) '比率設(shè)定
Select Case Index
Case 0
CurrRate = 1
Case 1
CurrRate = 1.3
Case 2
CurrRate = 1.7
Case 3
CurrRate = 2
End Select
Command3.Enabled = True
End Sub
Private Sub SVolumn_Change() '音量設(shè)定
Command3.Enabled = True
If SVolumn.Value = 100 Then
Check2.Value = 1
Else
Check2.Value = 0
End If
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -