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

📄 frmvbamp.frm

📁 一个类似于WinAmp的Mp3播放器,功能不错,有换肤等功能,是一个不错的vb播放器.
💻 FRM
📖 第 1 页 / 共 5 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmVBAmp 
   Appearance      =   0  'Flat
   BackColor       =   &H80000004&
   BorderStyle     =   0  'None
   Caption         =   "VB-Amp"
   ClientHeight    =   1650
   ClientLeft      =   1650
   ClientTop       =   1530
   ClientWidth     =   4080
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   FillColor       =   &H00FFFFFF&
   Icon            =   "frmVBAmp.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   OLEDropMode     =   1  'Manual
   ScaleHeight     =   110
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   272
   ShowInTaskbar   =   0   'False
   Begin VB.ListBox Juke 
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   270
      IntegralHeight  =   0   'False
      Left            =   2205
      OLEDropMode     =   1  'Manual
      TabIndex        =   14
      Top             =   750
      Visible         =   0   'False
      Width           =   870
   End
   Begin VB.FileListBox File1 
      Height          =   810
      Left            =   3120
      TabIndex        =   12
      ToolTipText     =   "Song List"
      Top             =   525
      Visible         =   0   'False
      Width           =   900
   End
   Begin VB.PictureBox Pic 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   375
      Index           =   2
      Left            =   1785
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   25
      TabIndex        =   11
      Top             =   1125
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.PictureBox Pic 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   375
      Index           =   1
      Left            =   1365
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   25
      TabIndex        =   10
      Top             =   1125
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.PictureBox Pic 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   375
      Index           =   0
      Left            =   945
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   25
      TabIndex        =   9
      Top             =   1125
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.PictureBox iSlider 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00C0C000&
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   0
      Left            =   480
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   25
      TabIndex        =   8
      Top             =   720
      Visible         =   0   'False
      Width           =   375
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   855
      Top             =   45
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Timer Timer2 
      Interval        =   200
      Left            =   1380
      Top             =   45
   End
   Begin VB.ListBox AutoList 
      Height          =   420
      Left            =   3120
      TabIndex        =   7
      Top             =   45
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.PictureBox Img 
      AutoRedraw      =   -1  'True
      BackColor       =   &H000000FF&
      BorderStyle     =   0  'None
      Height          =   375
      Index           =   0
      Left            =   60
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   25
      TabIndex        =   6
      Top             =   705
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.PictureBox ResBmp 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000001&
      BorderStyle     =   0  'None
      ClipControls    =   0   'False
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   465
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   27
      TabIndex        =   5
      Top             =   1110
      Visible         =   0   'False
      Width           =   405
   End
   Begin VB.PictureBox TmpBtn 
      AutoRedraw      =   -1  'True
      BackColor       =   &H000080FF&
      BorderStyle     =   0  'None
      Height          =   375
      Left            =   60
      ScaleHeight     =   25
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   25
      TabIndex        =   4
      Top             =   1110
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Timer Timer1 
      Interval        =   25
      Left            =   1395
      Top             =   480
   End
   Begin VB.ListBox PlPath 
      Appearance      =   0  'Flat
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   345
      IntegralHeight  =   0   'False
      Left            =   2190
      TabIndex        =   2
      Top             =   360
      Visible         =   0   'False
      Width           =   885
   End
   Begin VB.ListBox PlNames 
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   270
      IntegralHeight  =   0   'False
      Left            =   2190
      OLEDropMode     =   1  'Manual
      TabIndex        =   1
      Top             =   60
      Width           =   870
   End
   Begin VB.Label Dig 
      BackStyle       =   0  'Transparent
      Height          =   345
      Index           =   0
      Left            =   1470
      TabIndex        =   13
      Top             =   555
      Width           =   480
   End
   Begin VB.Image iCover 
      Height          =   390
      Left            =   945
      Stretch         =   -1  'True
      Top             =   555
      Width           =   390
   End
   Begin VB.Label Btn 
      BackColor       =   &H80000018&
      BackStyle       =   0  'Transparent
      Height          =   150
      Index           =   0
      Left            =   1380
      TabIndex        =   3
      Top             =   495
      Visible         =   0   'False
      Width           =   165
   End
   Begin VB.Shape Ind 
      BorderStyle     =   0  'Transparent
      FillColor       =   &H000000FF&
      FillStyle       =   0  'Solid
      Height          =   150
      Index           =   0
      Left            =   1875
      Top             =   330
      Visible         =   0   'False
      Width           =   150
   End
   Begin VB.Label Lbl 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "X"
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   180
      Index           =   0
      Left            =   1890
      TabIndex        =   0
      ToolTipText     =   "Song Title"
      Top             =   90
      UseMnemonic     =   0   'False
      Visible         =   0   'False
      Width           =   210
   End
End
Attribute VB_Name = "frmVBAmp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'VB-Amp Professional (C)1999 Steve J. Gray
'=================== With contributions from various people (see credits)
'
' This is the main code of the program. It loads the interface
' and responds to button presses. It controls playback, manages
' the playlist, and loads/saves preference settings.
' It loads in the tray icon and opens/closes the preferences and
' cover windows as required. It calls code in the "common" module
' for things like checking files, manipulating filenames, and
' doing low-level API calls.

' Thanks to Rollie Ulug <rageamp@realedge.com> for converting the
' playback routines to DirectX and cleaning up the declaration of
' all the variables (allowing use of Option Explicit).

Option Explicit

' Here are the new DirectX opjects
'直接调用ImediaControl类的无参函数Run,Pause,Stop等就可以控制流媒体的播放进程;利用IMediaPosition类对具体播放细节进行定位操作
Public MediaControl As IMediaControl     'MediaControl Object
Public MediaPosition As IMediaPosition   'MediaPosition Object
Public BasicAudio  As IBasicAudio        'Basic 的音频对象,用来处理媒体流中的语音数据

' Define public variables定义公共变量
Public Prg As String, Sect As String
Public DragFlag As Boolean, InternetFile As Boolean
Public SlideFlag As Integer
Public TwipX As Integer, TwipY As Integer
Public IX As Integer, IY As Integer
Public TX As Integer, TY As Integer
Public FX As Integer, FY As Integer
Public TNum As Integer, SongLen As Double, Dev As String
Public SongName As String, SongPath As String, SongTitle As String
Public AddName As String, AddPath As String, AddTitle As String
Public DefPath As String
Public Intro As Boolean, STP As Boolean, Shuffle As Boolean, Repeat As Boolean
Public Playing As Boolean, Paused As Boolean, Random As Boolean, Stereo As Boolean
Public TimeFlag As Boolean, Elapsed As Double, Remain As Double, TimeDisp As Long
Public RptA As Long, RptB As Long
Public LastCover As String, MinH As Integer, MaxH As Integer
Public NewP As Single, Mute As Boolean
Public HFlag As Integer, Small As Integer
Public CoolFlag As Integer
Public SkinLink1 As String, SkinLink2 As String
Public InFlag As Boolean, DowS As String
Public MemFlag As Integer, LastIndex As Integer
Public ScrollStart As Integer, PLCover As String
Public hRgn As Long

Public PlayUnit As Integer 'current playback unit (0 or 1)

' Define public Arrays
Dim FSize(2) As Coord
Dim PolyPt() As Coord, PolyNum() As Long
Dim Kbd(120) As String * 1
Dim cx(120) As Integer, cy(120) As Integer
Dim Di(6) As DEx, Sli(5) As DEx
Dim Link(20) As String
'

'The Main initialization routines主要的设定初值常式
Private Sub Form_Load()
Dim A As Integer, F As String, X As Long, Y As Long
    TwipX = Screen.TwipsPerPixelX
    TwipY = Screen.TwipsPerPixelY
    
    'Load objects
    For A = 1 To 120: Load Btn(A): Btn(A).Caption = "": Next
    For A = 1 To 50: Load Lbl(A): Lbl(A).Caption = "": Next
    For A = 1 To 18: Load Ind(A): Next
    For A = 1 To 1: Load Img(A): Next
    For A = 1 To 6: Load Dig(A): Next
    For A = 1 To 5: Load iSlider(A): Next
    
    Lbl(1).Alignment = 1 'right justify time
        
    Prg = "vbampprodx": Sect = "config"
    
    'get option settings
    'GetSetting 函数返回 Windows 注册表中某个应用程序项的项设置值。
    OptDefPath = GetSetting(Prg, Sect, "Path", "")
    OptAlwaysOnTop = Val(GetSetting(Prg, Sect, "WinOnTop", 0))
    OptSnap = Val(GetSetting(Prg, Sect, "WinSnap", 0))
    OptSavePos = Val(GetSetting(Prg, Sect, "WinSavePos", 0))
    OptAuto = Val(GetSetting(Prg, Sect, "Auto", 0))
    OptSnooze = Val(GetSetting(Prg, Sect, "Snooze", 0))
    OptSnoozeMd = Val(GetSetting(Prg, Sect, "SnoozeMode", 0))
    OptSnoozeAt = GetSetting(Prg, Sect, "SnoozeTime", "23:59")
    OptMinOnSnz = Val(GetSetting(Prg, Sect, "SnoozeHide", 0))
    OptExitMd = Val(GetSetting(Prg, Sect, "ExitMode", 0))
    OptStartMd = Val(GetSetting(Prg, Sect, "StartMd", 0))
    OptStartMin = Val(GetSetting(Prg, Sect, "StartMin", 0))
    OptStartMute = Val(GetSetting(Prg, Sect, "StartMute", 0))
    OptStartFile = GetSetting(Prg, Sect, "StartFile", "")
    OptSkinName = GetSetting(Prg, Sect, "Skin", "")
    OptSkinPath = GetSetting(Prg, Sect, "SkinPath", "")
    OptSkinImport = GetSetting(Prg, Sect, "SkinImport", "")
    OptTimeFmt = Val(GetSetting(Prg, Sect, "TimeFmt", ""))
    OptVisPLPath = GetSetting(Prg, Sect, "VisPLPath", "")
    OptClrPl = Val(GetSetting(Prg, Sect, "ClearPLFirst", ""))
    OptAutoPlay = Val(GetSetting(Prg, Sect, "AutoPlay", ""))

⌨️ 快捷键说明

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