📄 openmpx.vb
字号:
Option Strict Off
Option Explicit On
Friend Class OpenMpx
Inherits System.Windows.Forms.Form
#Region "Windows 窗体设计器生成的代码"
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
If m_InitializingDefInstance Then
m_vb6FormDefInstance = Me
Else
Try
'对于启动窗体,所创建的第一个实例为默认实例。
If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
m_vb6FormDefInstance = Me
End If
Catch
End Try
End If
End If
'此调用是 Windows 窗体设计器所必需的。
InitializeComponent()
End Sub
'窗体重写处置,以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.Container
Public ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents Command1 As System.Windows.Forms.Button
Public WithEvents Dk As System.Windows.Forms.Button
Public WithEvents File1 As Microsoft.VisualBasic.Compatibility.VB6.FileListBox
Public WithEvents Dir1 As Microsoft.VisualBasic.Compatibility.VB6.DirListBox
Public WithEvents Drive1 As Microsoft.VisualBasic.Compatibility.VB6.DriveListBox
'注意:以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器来修改它。
'不要使用代码编辑器来修改它。
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
Me.ToolTip1.Active = True
Me.Command1 = New System.Windows.Forms.Button
Me.Dk = New System.Windows.Forms.Button
Me.File1 = New Microsoft.VisualBasic.Compatibility.VB6.FileListBox
Me.Dir1 = New Microsoft.VisualBasic.Compatibility.VB6.DirListBox
Me.Drive1 = New Microsoft.VisualBasic.Compatibility.VB6.DriveListBox
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.ClientSize = New System.Drawing.Size(454, 260)
Me.Location = New System.Drawing.Point(3, 18)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.SystemColors.Control
Me.ControlBox = True
Me.Enabled = True
Me.KeyPreview = False
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ShowInTaskbar = True
Me.HelpButton = False
Me.WindowState = System.Windows.Forms.FormWindowState.Normal
Me.Name = "OpenMpx"
Me.Command1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.Command1.Text = "取消"
Me.Command1.Size = New System.Drawing.Size(76, 22)
Me.Command1.Location = New System.Drawing.Point(369, 48)
Me.Command1.TabIndex = 4
Me.Command1.BackColor = System.Drawing.SystemColors.Control
Me.Command1.CausesValidation = True
Me.Command1.Enabled = True
Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command1.TabStop = True
Me.Command1.Name = "Command1"
Me.Dk.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.Dk.Text = "打开"
Me.AcceptButton = Me.Dk
Me.Dk.Size = New System.Drawing.Size(76, 22)
Me.Dk.Location = New System.Drawing.Point(369, 18)
Me.Dk.TabIndex = 3
Me.Dk.BackColor = System.Drawing.SystemColors.Control
Me.Dk.CausesValidation = True
Me.Dk.Enabled = True
Me.Dk.Cursor = System.Windows.Forms.Cursors.Default
Me.Dk.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Dk.TabStop = True
Me.Dk.Name = "Dk"
Me.File1.Size = New System.Drawing.Size(169, 246)
Me.File1.Location = New System.Drawing.Point(189, 6)
Me.File1.Pattern = "*.mp?"
Me.File1.TabIndex = 2
Me.File1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.File1.Archive = True
Me.File1.BackColor = System.Drawing.SystemColors.Window
Me.File1.CausesValidation = True
Me.File1.Enabled = True
Me.File1.ForeColor = System.Drawing.SystemColors.WindowText
Me.File1.Hidden = False
Me.File1.Cursor = System.Windows.Forms.Cursors.Default
Me.File1.SelectionMode = System.Windows.Forms.SelectionMode.One
Me.File1.Normal = True
Me.File1.ReadOnly = True
Me.File1.System = False
Me.File1.TabStop = True
Me.File1.TopIndex = 0
Me.File1.Visible = True
Me.File1.Name = "File1"
Me.Dir1.Size = New System.Drawing.Size(169, 216)
Me.Dir1.Location = New System.Drawing.Point(12, 9)
Me.Dir1.TabIndex = 1
Me.Dir1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.Dir1.BackColor = System.Drawing.SystemColors.Window
Me.Dir1.CausesValidation = True
Me.Dir1.Enabled = True
Me.Dir1.ForeColor = System.Drawing.SystemColors.WindowText
Me.Dir1.Cursor = System.Windows.Forms.Cursors.Default
Me.Dir1.TabStop = True
Me.Dir1.Visible = True
Me.Dir1.Name = "Dir1"
Me.Drive1.Size = New System.Drawing.Size(169, 20)
Me.Drive1.Location = New System.Drawing.Point(12, 231)
Me.Drive1.TabIndex = 0
Me.Drive1.BackColor = System.Drawing.SystemColors.Window
Me.Drive1.CausesValidation = True
Me.Drive1.Enabled = True
Me.Drive1.ForeColor = System.Drawing.SystemColors.WindowText
Me.Drive1.Cursor = System.Windows.Forms.Cursors.Default
Me.Drive1.TabStop = True
Me.Drive1.Visible = True
Me.Drive1.Name = "Drive1"
Me.Controls.Add(Command1)
Me.Controls.Add(Dk)
Me.Controls.Add(File1)
Me.Controls.Add(Dir1)
Me.Controls.Add(Drive1)
End Sub
#End Region
#Region "升级支持"
Private Shared m_vb6FormDefInstance As OpenMpx
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As OpenMpx
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New OpenMpx()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
m_vb6FormDefInstance = Value
End Set
End Property
#End Region
Dim Dropdir As String
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
Hide()
End Sub
Private Sub Dir1_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Dir1.Change
File1.Path = Dir1.Path
End Sub
Private Sub Dk_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Dk.Click
If Me.Text = "" Then
GoTo Box
Else
Mp3ToWav.DefInstance.PlaySong.Text = Me.Text
Mp3ToWav.DefInstance.MP.Close()
Mp3ToWav.DefInstance.Command1(0).Enabled = True
Mp3ToWav.DefInstance.Command1(0).PerformClick()
Hide()
End If
Box:
End Sub
Private Sub Drive1_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Drive1.SelectedIndexChanged
On Error Resume Next
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles File1.SelectedIndexChanged
If Mid(Dir1.Path, Len(Dir1.Path)) = "\" Then
Dropdir = Dir1.Path
Else
Dropdir = Dir1.Path & "\"
End If
Command1.Enabled = True
Me.Text = Dropdir & File1.FileName
End Sub
Private Sub File1_DoubleClick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles File1.DoubleClick
Dk_Click(Dk, New System.EventArgs())
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -