📄 frmplayer.vb
字号:
Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class frmPlayer
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
Private components As System.ComponentModel.IContainer
'Windows 窗体设计器所必需的
Public ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents Timer1 As System.Windows.Forms.Timer
Public WithEvents slVolume As AxComctlLib.AxSlider
Public WithEvents cmdNext As System.Windows.Forms.Button
Public WithEvents cmdBack As System.Windows.Forms.Button
Public WithEvents cmdStop As System.Windows.Forms.Button
Public WithEvents cmdPause As System.Windows.Forms.Button
Public WithEvents cmdPlay As System.Windows.Forms.Button
Public WithEvents txtSong As System.Windows.Forms.TextBox
Public WithEvents lblHide As System.Windows.Forms.Label
Public WithEvents Frame1 As System.Windows.Forms.GroupBox
Public WithEvents cmdRemove As System.Windows.Forms.Button
Public WithEvents cmdClear As System.Windows.Forms.Button
Public WithEvents lstSelected As System.Windows.Forms.ListBox
Public WithEvents cmdAdd As System.Windows.Forms.Button
Public WithEvents cmdUp As System.Windows.Forms.Button
Public WithEvents lstFiles As System.Windows.Forms.ListBox
Public WithEvents cmbDrives As System.Windows.Forms.ComboBox
'注意:以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器来修改它。
'不要使用代码编辑器来修改它。
Friend WithEvents Player As AxMediaPlayer.AxMediaPlayer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmPlayer))
Me.cmdClear = New System.Windows.Forms.Button()
Me.cmdPlay = New System.Windows.Forms.Button()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.lblHide = New System.Windows.Forms.Label()
Me.txtSong = New System.Windows.Forms.TextBox()
Me.Frame1 = New System.Windows.Forms.GroupBox()
Me.slVolume = New AxComctlLib.AxSlider()
Me.cmdNext = New System.Windows.Forms.Button()
Me.cmdBack = New System.Windows.Forms.Button()
Me.cmdStop = New System.Windows.Forms.Button()
Me.cmdPause = New System.Windows.Forms.Button()
Me.lstSelected = New System.Windows.Forms.ListBox()
Me.cmbDrives = New System.Windows.Forms.ComboBox()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.cmdAdd = New System.Windows.Forms.Button()
Me.cmdRemove = New System.Windows.Forms.Button()
Me.lstFiles = New System.Windows.Forms.ListBox()
Me.cmdUp = New System.Windows.Forms.Button()
Me.Player = New AxMediaPlayer.AxMediaPlayer()
Me.Frame1.SuspendLayout()
CType(Me.slVolume, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Player, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'cmdClear
'
Me.cmdClear.BackColor = System.Drawing.SystemColors.Control
Me.cmdClear.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdClear.Location = New System.Drawing.Point(376, 395)
Me.cmdClear.Name = "cmdClear"
Me.cmdClear.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdClear.Size = New System.Drawing.Size(165, 49)
Me.cmdClear.TabIndex = 5
Me.cmdClear.Text = "清除 ×"
'
'cmdPlay
'
Me.cmdPlay.BackColor = System.Drawing.SystemColors.Control
Me.cmdPlay.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdPlay.Location = New System.Drawing.Point(19, 108)
Me.cmdPlay.Name = "cmdPlay"
Me.cmdPlay.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdPlay.Size = New System.Drawing.Size(101, 42)
Me.cmdPlay.TabIndex = 9
Me.cmdPlay.Text = "播放"
'
'lblHide
'
Me.lblHide.BackColor = System.Drawing.SystemColors.Control
Me.lblHide.Cursor = System.Windows.Forms.Cursors.Default
Me.lblHide.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblHide.Location = New System.Drawing.Point(797, 111)
Me.lblHide.Name = "lblHide"
Me.lblHide.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblHide.Size = New System.Drawing.Size(90, 27)
Me.lblHide.TabIndex = 15
Me.lblHide.Text = "展开>>"
Me.ToolTip1.SetToolTip(Me.lblHide, "Show/Hide files")
'
'txtSong
'
Me.txtSong.AcceptsReturn = True
Me.txtSong.AutoSize = False
Me.txtSong.BackColor = System.Drawing.SystemColors.WindowFrame
Me.txtSong.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtSong.ForeColor = System.Drawing.Color.Yellow
Me.txtSong.Location = New System.Drawing.Point(19, 47)
Me.txtSong.MaxLength = 0
Me.txtSong.Name = "txtSong"
Me.txtSong.ReadOnly = True
Me.txtSong.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtSong.Size = New System.Drawing.Size(627, 38)
Me.txtSong.TabIndex = 8
Me.txtSong.Text = ""
'
'Frame1
'
Me.Frame1.BackColor = System.Drawing.SystemColors.Control
Me.Frame1.Controls.AddRange(New System.Windows.Forms.Control() {Me.slVolume, Me.cmdNext, Me.cmdBack, Me.cmdStop, Me.cmdPause, Me.cmdPlay, Me.txtSong, Me.lblHide})
Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Frame1.Location = New System.Drawing.Point(19, 0)
Me.Frame1.Name = "Frame1"
Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Frame1.Size = New System.Drawing.Size(928, 163)
Me.Frame1.TabIndex = 7
Me.Frame1.TabStop = False
'
'slVolume
'
Me.slVolume.ContainingControl = Me
Me.slVolume.Location = New System.Drawing.Point(677, 55)
Me.slVolume.Name = "slVolume"
Me.slVolume.OcxState = CType(resources.GetObject("slVolume.OcxState"), System.Windows.Forms.AxHost.State)
Me.slVolume.Size = New System.Drawing.Size(233, 42)
Me.slVolume.TabIndex = 14
'
'cmdNext
'
Me.cmdNext.BackColor = System.Drawing.SystemColors.Control
Me.cmdNext.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdNext.Location = New System.Drawing.Point(617, 108)
Me.cmdNext.Name = "cmdNext"
Me.cmdNext.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdNext.Size = New System.Drawing.Size(120, 42)
Me.cmdNext.TabIndex = 13
Me.cmdNext.Text = "后一首"
'
'cmdBack
'
Me.cmdBack.BackColor = System.Drawing.SystemColors.Control
Me.cmdBack.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdBack.Location = New System.Drawing.Point(467, 108)
Me.cmdBack.Name = "cmdBack"
Me.cmdBack.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdBack.Size = New System.Drawing.Size(120, 42)
Me.cmdBack.TabIndex = 12
Me.cmdBack.Text = "前一首"
'
'cmdStop
'
Me.cmdStop.BackColor = System.Drawing.SystemColors.Control
Me.cmdStop.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdStop.Location = New System.Drawing.Point(286, 108)
Me.cmdStop.Name = "cmdStop"
Me.cmdStop.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdStop.Size = New System.Drawing.Size(105, 42)
Me.cmdStop.TabIndex = 11
Me.cmdStop.Text = "停止"
'
'cmdPause
'
Me.cmdPause.BackColor = System.Drawing.SystemColors.Control
Me.cmdPause.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdPause.Location = New System.Drawing.Point(150, 108)
Me.cmdPause.Name = "cmdPause"
Me.cmdPause.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdPause.Size = New System.Drawing.Size(105, 42)
Me.cmdPause.TabIndex = 10
Me.cmdPause.Text = "暂停"
'
'lstSelected
'
Me.lstSelected.BackColor = System.Drawing.SystemColors.Window
Me.lstSelected.Cursor = System.Windows.Forms.Cursors.Default
Me.lstSelected.ForeColor = System.Drawing.SystemColors.WindowText
Me.lstSelected.ItemHeight = 18
Me.lstSelected.Location = New System.Drawing.Point(556, 267)
Me.lstSelected.Name = "lstSelected"
Me.lstSelected.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lstSelected.Size = New System.Drawing.Size(370, 130)
Me.lstSelected.TabIndex = 4
'
'cmbDrives
'
Me.cmbDrives.BackColor = System.Drawing.SystemColors.Window
Me.cmbDrives.Cursor = System.Windows.Forms.Cursors.Default
Me.cmbDrives.DropDownWidth = 165
Me.cmbDrives.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbDrives.Location = New System.Drawing.Point(19, 204)
Me.cmbDrives.Name = "cmbDrives"
Me.cmbDrives.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbDrives.Size = New System.Drawing.Size(252, 26)
Me.cmbDrives.TabIndex = 0
'
'Timer1
'
Me.Timer1.Interval = 3000
'
'cmdAdd
'
Me.cmdAdd.BackColor = System.Drawing.SystemColors.Control
Me.cmdAdd.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdAdd.Location = New System.Drawing.Point(376, 267)
Me.cmdAdd.Name = "cmdAdd"
Me.cmdAdd.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdAdd.Size = New System.Drawing.Size(165, 50)
Me.cmdAdd.TabIndex = 3
Me.cmdAdd.Text = "添加 》》"
'
'cmdRemove
'
Me.cmdRemove.BackColor = System.Drawing.SystemColors.Control
Me.cmdRemove.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdRemove.Location = New System.Drawing.Point(376, 327)
Me.cmdRemove.Name = "cmdRemove"
Me.cmdRemove.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdRemove.Size = New System.Drawing.Size(165, 49)
Me.cmdRemove.TabIndex = 6
Me.cmdRemove.Text = "移除《《"
'
'lstFiles
'
Me.lstFiles.BackColor = System.Drawing.SystemColors.Window
Me.lstFiles.Cursor = System.Windows.Forms.Cursors.Default
Me.lstFiles.ForeColor = System.Drawing.SystemColors.WindowText
Me.lstFiles.ItemHeight = 18
Me.lstFiles.Location = New System.Drawing.Point(19, 267)
Me.lstFiles.Name = "lstFiles"
Me.lstFiles.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lstFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstFiles.Size = New System.Drawing.Size(341, 130)
Me.lstFiles.TabIndex = 1
'
'cmdUp
'
Me.cmdUp.BackColor = System.Drawing.SystemColors.Control
Me.cmdUp.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdUp.Location = New System.Drawing.Point(301, 204)
Me.cmdUp.Name = "cmdUp"
Me.cmdUp.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdUp.Size = New System.Drawing.Size(59, 43)
Me.cmdUp.TabIndex = 2
Me.cmdUp.Text = "Up"
'
'Player
'
Me.Player.Location = New System.Drawing.Point(241, 517)
Me.Player.Name = "Player"
Me.Player.OcxState = CType(resources.GetObject("Player.OcxState"), System.Windows.Forms.AxHost.State)
Me.Player.Size = New System.Drawing.Size(670, 479)
Me.Player.TabIndex = 8
'
'frmPlayer
'
Me.AutoScaleBaseSize = New System.Drawing.Size(10, 21)
Me.ClientSize = New System.Drawing.Size(961, 447)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Player, Me.Frame1, Me.cmdRemove, Me.cmdClear, Me.lstSelected, Me.cmdAdd, Me.cmdUp, Me.lstFiles, Me.cmbDrives})
Me.Location = New System.Drawing.Point(3, 16)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmPlayer"
Me.Text = "Player"
Me.Frame1.ResumeLayout(False)
CType(Me.slVolume, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Player, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
#Region "升级支持"
Private Shared m_vb6FormDefInstance As frmPlayer
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As frmPlayer
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New frmPlayer()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -