📄 frmconv.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmConv
BackColor = &H00F7D2B5&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 2970
ClientLeft = 0
ClientTop = 0
ClientWidth = 5985
LinkTopic = "Form1"
ScaleHeight = 2970
ScaleWidth = 5985
ShowInTaskbar = 0 'False
Begin VB.Frame fmHelp
Appearance = 0 'Flat
BackColor = &H8000000D&
BorderStyle = 0 'None
Caption = "Help"
ForeColor = &H00FFFFFF&
Height = 2295
Left = 600
TabIndex = 9
Top = 480
Width = 4575
Begin VB.Label lblf
Alignment = 2 'Center
Caption = "What is FFMPEG ?"
Height = 255
Left = 1440
TabIndex = 13
Top = 1680
Width = 1575
End
Begin VB.Label lblOk
Alignment = 2 'Center
Caption = "OK"
Height = 195
Left = 1920
TabIndex = 12
Top = 2040
Width = 615
End
Begin VB.Label lblMsg
BackStyle = 0 'Transparent
Caption = $"frmConv.frx":0000
ForeColor = &H00FFFFFF&
Height = 1335
Left = 240
TabIndex = 11
Top = 360
Width = 4095
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Help"
ForeColor = &H00FFFFFF&
Height = 255
Left = 120
TabIndex = 10
Top = 0
Width = 495
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
BorderWidth = 2
X1 = 600
X2 = 4320
Y1 = 120
Y2 = 120
End
End
Begin VB.Timer Timer1
Left = 7200
Top = 960
End
Begin VB.CommandButton cmdConvert
Caption = "Convert"
Height = 855
Left = 4560
TabIndex = 6
Top = 1560
Width = 1215
End
Begin ComctlLib.ProgressBar pbConv
Height = 255
Left = 240
TabIndex = 5
Top = 2040
Width = 4095
_ExtentX = 7223
_ExtentY = 450
_Version = 327682
Appearance = 0
MousePointer = 3
Max = 4
End
Begin MSComDlg.CommonDialog cd
Left = 6720
Top = 960
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton cmdLoad
Caption = "Browse"
Height = 255
Left = 4560
TabIndex = 3
Top = 840
Width = 1215
End
Begin VB.TextBox txtFname
BackColor = &H00C27C42&
BorderStyle = 0 'None
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 240
TabIndex = 1
Top = 840
Width = 4215
End
Begin VB.ComboBox cmbFormat
Appearance = 0 'Flat
BackColor = &H00C27C42&
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 315
ItemData = "frmConv.frx":015C
Left = 240
List = "frmConv.frx":01B1
Style = 2 'Dropdown List
TabIndex = 0
Top = 1560
Width = 4095
End
Begin VB.Label lblHelp
BackStyle = 0 'Transparent
Caption = " ?"
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 4800
TabIndex = 8
Top = 60
Width = 255
End
Begin VB.Label lblStatus
BackStyle = 0 'Transparent
Caption = "Status:"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 495
Left = 240
TabIndex = 7
Top = 2280
Width = 3855
End
Begin VB.Shape Shape2
BorderColor = &H00C27C42&
Height = 375
Left = 0
Top = 0
Width = 1095
End
Begin VB.Image Image2
Height = 285
Left = 5280
Picture = "frmConv.frx":040F
Stretch = -1 'True
Top = 45
Width = 615
End
Begin VB.Image Image4
Height = 375
Left = 0
Picture = "frmConv.frx":288E
Stretch = -1 'True
Top = 0
Width = 6015
End
Begin VB.Image clr
Height = 240
Left = 9960
Picture = "frmConv.frx":49DB
Top = 1320
Width = 600
End
Begin VB.Image clb
Height = 285
Left = 9960
Picture = "frmConv.frx":6F00
Stretch = -1 'True
Top = 1680
Width = 615
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Select Format"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 255
Left = 240
TabIndex = 4
Top = 1320
Width = 1935
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "FLV video file to convert"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 240
TabIndex = 2
Top = 600
Width = 4215
End
End
Attribute VB_Name = "frmConv"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private WithEvents AVC1 As AVC
Attribute AVC1.VB_VarHelpID = -1
Private IntCaptn As Integer
Private Sub AVC1_Converting()
On Error Resume Next
Dim I As Integer
lblStatus.ForeColor = &HFF& 'Red
Select Case IntCaptn
Case Is = 0
IntCaptn = 1
pbConv.Value = 1
lblStatus.Caption = "Processing."
Case Is = 1
IntCaptn = 2
pbConv.Value = 2
lblStatus.Caption = "Processing.."
Case Is = 2
IntCaptn = 3
pbConv.Value = 3
lblStatus.Caption = "Processing..."
Case Is = 3
IntCaptn = 0
pbConv.Value = 4
lblStatus.Caption = "Processing...."
End Select
End Sub
Private Sub AVC1_Complete()
On Error Resume Next
pbConv.Value = 0
lblStatus.ForeColor = &H8000& 'Green
lblStatus.Caption = "Complete!"
End Sub
Private Sub AVC1_ErrorEvent(ErrorMessage As String)
On Error Resume Next
lblStatus.ForeColor = &HFF& 'Red
lblStatus.Caption = "Error! " & ErrorMessage
MsgBox ErrorMessage
End Sub
Public Sub ConvertFLV(FormatType, SrcPath As String)
On Error Resume Next
Dim OutFileExt As String, OutFileName As String
Select Case FormatType
Case Is = "WAVE Sound (WAV)"
OutFileExt = ".wav"
AVC1.ForceFormat = "wav"
AVC1.AudioCodec = "pcm_s16le"
AVC1.AudioChannels = "2"
AVC1.AudioBitrate = "128"
AVC1.AudioSamples = "41000"
Case Is = "MP3 Sound (MP3)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -