⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 记号的土人播放器.rar 由 VB 做的
💻 FRM
字号:
VERSION 5.00
Object = "{6BF52A50-394A-11D3-B153-00C04F79FAA6}#1.0#0"; "wmp.dll"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "土人MP3"
   ClientHeight    =   2850
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5625
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2850
   ScaleWidth      =   5625
   StartUpPosition =   3  '窗口缺省
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   4440
      Top             =   240
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command5 
      Caption         =   "停止"
      Enabled         =   0   'False
      Height          =   495
      Left            =   4440
      TabIndex        =   6
      Top             =   1200
      Width           =   975
   End
   Begin VB.CommandButton cmdNext 
      Caption         =   "下一曲"
      Height          =   495
      Left            =   3360
      TabIndex        =   5
      Top             =   1200
      Width           =   855
   End
   Begin VB.CommandButton cmdContinue 
      Caption         =   "继续"
      Height          =   495
      Left            =   2280
      TabIndex        =   4
      Top             =   1200
      Width           =   855
   End
   Begin VB.CommandButton cmdPause 
      Caption         =   "暂停"
      Height          =   495
      Left            =   1200
      TabIndex        =   3
      Top             =   1200
      Width           =   855
   End
   Begin VB.CommandButton cmdPlay 
      Caption         =   "播放"
      Height          =   495
      Left            =   120
      TabIndex        =   2
      Top             =   1200
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   480
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   2280
      Width           =   4575
   End
   Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1 
      Height          =   855
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   2775
      URL             =   ""
      rate            =   1
      balance         =   0
      currentPosition =   0
      defaultFrame    =   ""
      playCount       =   1
      autoStart       =   -1  'True
      currentMarker   =   0
      invokeURLs      =   -1  'True
      baseURL         =   ""
      volume          =   50
      mute            =   0   'False
      uiMode          =   "full"
      stretchToFit    =   0   'False
      windowlessVideo =   0   'False
      enabled         =   -1  'True
      enableContextMenu=   -1  'True
      fullScreen      =   0   'False
      SAMIStyle       =   ""
      SAMILang        =   ""
      SAMIFilename    =   ""
      captioningID    =   ""
      enableErrorDialogs=   0   'False
      _cx             =   4895
      _cy             =   1508
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'初始化程序
Private Sub Form_Load()
'MediaPlayer1.Visible = False
cmdPlay.BackColor = vbRed
cmdPause.BackColor = vbRed
cmdContinue.BackColor = vbRed
'cmdStop.BackColor = vbRed
'cmdNext.BackColor = vbRed
cmdContinue.Enabled = False
cmdPause.Enabled = False
'cmdStop.Enabled = False
Text1.Text = "本播放器支持各种音乐格式。谢谢使用。 钟海鹏!!"
Text1.BackColor = vbBlack
Text1.ForeColor = vbYellow
End Sub

'播放
Private Sub cmdPlay_Click()
Text1.SetFocus
On Error GoTo handler
With CommonDialog1
'.Flags = cdlOFNAllowMultiselect
.InitDir = App.Path
.Filter = "Midi Files(*.mid)|*.mid|MP3 Files(*.mp3)|*.mp3|Wave Filse(*.wav)|*.wav|(*.m3u)|*.m3u"
.FileName = ""
.ShowOpen
End With
MediaPlayer1.FileName = CommonDialog1.FileName
MediaPlayer1.play
Text1.Text = " 现在正在播放:" & CommonDialog1.FileName
cmdPlay.Enabled = False
cmdPause.Enabled = True
cmdContinue.Enabled = False
cmdStop.Enabled = True
Exit Sub
handler:
MsgBox "未选择媒体文件。", vbOKOnly, "错误信息"
End Sub

'暂停播放
Private Sub cmdPause_Click()
Text1.SetFocus
MediaPlayer1.pause
cmdPause.Enabled = False
cmdContinue.Enabled = True
End Sub

'继续播放
Private Sub cmdContinue_Click()
Text1.SetFocus
MediaPlayer1.play
cmdPlay.Enabled = False
cmdPause.Enabled = True
cmdContinue.Enabled = False
End Sub

'播放下一曲
Private Sub cmdNext_Click()
On Error GoTo NextErr '播放非m3u文件时只能播放单

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -