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

📄 自制播放器1.frm

📁 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 
   Caption         =   "PPplayer"
   ClientHeight    =   6150
   ClientLeft      =   2970
   ClientTop       =   3165
   ClientWidth     =   6915
   Icon            =   "自制播放器1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   Picture         =   "自制播放器1.frx":0C62
   ScaleHeight     =   6150
   ScaleWidth      =   6915
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   500
      Left            =   360
      Top             =   3960
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   240
      Top             =   360
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command1 
      Caption         =   "选择媒体文件"
      Height          =   495
      Left            =   0
      TabIndex        =   2
      Top             =   5280
      Width           =   2415
   End
   Begin VB.PictureBox Picture1 
      Align           =   2  'Align Bottom
      AutoRedraw      =   -1  'True
      Height          =   375
      Left            =   0
      ScaleHeight     =   315
      ScaleWidth      =   6855
      TabIndex        =   0
      Top             =   5775
      Width           =   6915
   End
   Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1 
      Height          =   5835
      Left            =   2400
      TabIndex        =   1
      Top             =   0
      Width           =   4560
      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             =   8043
      _cy             =   10292
   End
   Begin VB.Menu mnufile 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnuopen 
         Caption         =   "打开文件(&O)..."
         Shortcut        =   ^O
      End
      Begin VB.Menu mnuclose 
         Caption         =   "退出(&X)"
         Shortcut        =   {DEL}
      End
   End
   Begin VB.Menu mnuplay 
      Caption         =   "播放(&P)"
      Begin VB.Menu mnufull 
         Caption         =   "全屏(&L)"
         Shortcut        =   ^L
      End
      Begin VB.Menu mnuesc 
         Caption         =   "退出全屏(&Q)"
         Shortcut        =   ^Q
      End
   End
   Begin VB.Menu mnuhelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu mnuguanyu 
         Caption         =   "关于PPplayer(&A)..."
      End
   End
   Begin VB.Menu mnuvote 
      Caption         =   "投票(&V)"
      Begin VB.Menu mnulove 
         Caption         =   "喜欢我吗..."
         Shortcut        =   ^F
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FlashWindow Lib "user32" ( _
    ByVal hwnd As Long, ByVal bInvert As Long) As Long
Dim OnFlash As Boolean
Private Sub Command1_Click()
CommonDialog1.ShowOpen
WindowsMediaPlayer1.URL = CommonDialog1.FileName
If OnFlash = False Then
Timer1.Enabled = True
OnFlash = True
Else
Timer1.Enabled = False
Call FlashWindow(Me.hwnd, False)
OnFlash = False
End If
End Sub

Private Sub Form_Load()
Form1.Picture1.Print "快捷键:退出del 全屏Ctrl+L  退出全屏Ctrl+Q  支持我Ctrl+F"

End Sub


Private Sub mnuclose_Click()
End
End Sub

Private Sub mnuesc_Click()
Form1.WindowsMediaPlayer1.fullScreen = False
End Sub

Private Sub mnufull_Click()
Form1.WindowsMediaPlayer1.fullScreen = True
End Sub

Private Sub mnuguanyu_Click()
Form2.Show vbModel
Form2.Picture1.Print "路漫漫其修远兮 吾将上下而求索"
End Sub

Private Sub mnulove_Click()
Form3.Show vbModel
End Sub

Private Sub mnuopen_Click()
CommonDialog1.ShowOpen
WindowsMediaPlayer1.URL = CommonDialog1.FileName
If OnFlash = False Then
Timer1.Enabled = True
OnFlash = True
Else
Timer1.Enabled = False
Call FlashWindow(Me.hwnd, False)
OnFlash = False
End If
End Sub


Private Sub Timer1_Timer()
Call FlashWindow(Me.hwnd, True)
End Sub

⌨️ 快捷键说明

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