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

📄 frmvbamp.frm

📁 一个无需MP3控件的MP3播放器源码
💻 FRM
📖 第 1 页 / 共 5 页
字号:
VERSION 5.00
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form frmVBAmp 
   Appearance      =   0  'Flat
   BackColor       =   &H80000004&
   BorderStyle     =   0  'None
   Caption         =   "VB-Amp"
   ClientHeight    =   1560
   ClientLeft      =   1650
   ClientTop       =   1530
   ClientWidth     =   3660
   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     =   104
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   244
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox iSlider 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00C0C000&
      BorderStyle     =   0  'None
      Height          =   330
      Index           =   0
      Left            =   1035
      ScaleHeight     =   22
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   24
      TabIndex        =   10
      Top             =   1125
      Visible         =   0   'False
      Width           =   360
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   75
      Top             =   1035
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   327681
   End
   Begin VB.Timer Timer2 
      Interval        =   1000
      Left            =   1425
      Top             =   45
   End
   Begin VB.ListBox AutoList 
      Height          =   450
      Left            =   2640
      TabIndex        =   9
      Top             =   825
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.PictureBox Dig 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      Height          =   450
      Index           =   0
      Left            =   930
      ScaleHeight     =   30
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   42
      TabIndex        =   8
      Top             =   510
      Visible         =   0   'False
      Width           =   630
   End
   Begin VB.PictureBox Img 
      AutoRedraw      =   -1  'True
      BackColor       =   &H000000FF&
      BorderStyle     =   0  'None
      Height          =   330
      Index           =   0
      Left            =   645
      ScaleHeight     =   22
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   22
      TabIndex        =   7
      Top             =   1125
      Visible         =   0   'False
      Width           =   330
   End
   Begin VB.PictureBox ResBmp 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   330
      Left            =   1845
      ScaleHeight     =   22
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   22
      TabIndex        =   6
      Top             =   1095
      Visible         =   0   'False
      Width           =   330
   End
   Begin VB.PictureBox TmpBtn 
      AutoRedraw      =   -1  'True
      BackColor       =   &H000080FF&
      BorderStyle     =   0  'None
      Height          =   330
      Left            =   1470
      ScaleHeight     =   22
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   22
      TabIndex        =   5
      Top             =   1110
      Visible         =   0   'False
      Width           =   330
   End
   Begin MCI.MMControl MMControl 
      Height          =   300
      Index           =   0
      Left            =   45
      TabIndex        =   0
      Top             =   45
      Visible         =   0   'False
      Width           =   780
      _ExtentX        =   1376
      _ExtentY        =   529
      _Version        =   327681
      BorderStyle     =   0
      PrevEnabled     =   -1  'True
      NextEnabled     =   -1  'True
      PlayEnabled     =   -1  'True
      PauseEnabled    =   -1  'True
      StopEnabled     =   -1  'True
      EjectEnabled    =   -1  'True
      AutoEnable      =   0   'False
      PrevVisible     =   0   'False
      NextVisible     =   0   'False
      PauseVisible    =   0   'False
      BackVisible     =   0   'False
      StepVisible     =   0   'False
      RecordVisible   =   0   'False
      EjectVisible    =   0   'False
      Shareable       =   -1  'True
      DeviceType      =   ""
      FileName        =   ""
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   915
      Top             =   45
   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            =   2625
      TabIndex        =   3
      Top             =   450
      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          =   360
      Left            =   2625
      OLEDropMode     =   1  'Manual
      TabIndex        =   2
      Top             =   60
      Width           =   870
   End
   Begin MCI.MMControl MMControl 
      Height          =   300
      Index           =   1
      Left            =   45
      TabIndex        =   11
      Top             =   360
      Visible         =   0   'False
      Width           =   780
      _ExtentX        =   1376
      _ExtentY        =   529
      _Version        =   327681
      BorderStyle     =   0
      PrevEnabled     =   -1  'True
      NextEnabled     =   -1  'True
      PlayEnabled     =   -1  'True
      PauseEnabled    =   -1  'True
      StopEnabled     =   -1  'True
      EjectEnabled    =   -1  'True
      AutoEnable      =   0   'False
      PrevVisible     =   0   'False
      NextVisible     =   0   'False
      PauseVisible    =   0   'False
      BackVisible     =   0   'False
      StepVisible     =   0   'False
      RecordVisible   =   0   'False
      EjectVisible    =   0   'False
      Shareable       =   -1  'True
      DeviceType      =   ""
      FileName        =   ""
   End
   Begin VB.Image iCover 
      Height          =   450
      Left            =   1650
      Stretch         =   -1  'True
      Top             =   525
      Width           =   525
   End
   Begin VB.Label Btn 
      BackColor       =   &H80000018&
      BackStyle       =   0  'Transparent
      Height          =   150
      Index           =   0
      Left            =   1380
      TabIndex        =   4
      Top             =   495
      Visible         =   0   'False
      Width           =   165
   End
   Begin VB.Shape Ind 
      BorderStyle     =   0  'Transparent
      FillColor       =   &H000000FF&
      FillStyle       =   0  'Solid
      Height          =   60
      Index           =   0
      Left            =   2250
      Top             =   360
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Shape sBlip 
      BorderStyle     =   0  'Transparent
      FillColor       =   &H0000C000&
      FillStyle       =   0  'Solid
      Height          =   255
      Left            =   2385
      Top             =   75
      Width           =   45
   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            =   2040
      TabIndex        =   1
      ToolTipText     =   "Song Title"
      Top             =   105
      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
'
' 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.

DefInt A-Z

Public Prg As String, Sect As String
Public DragFlag As Boolean
Public SlideFlag As Integer '**changed!
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 Long, Dev$
Public SongName As String, SongPath As String, SongTitle As String
Public AddName As String, AddPath As String, AddTitle As String
Public DefPath As String, Info As String
Public Intro As Boolean, STP As Boolean, Shuffle As Boolean, Repeat As Boolean
Public Playing As Boolean, Paused As Boolean
Public TimeFlag As Boolean, Elapsed As Long, Remain As Long, TimeDisp As Long
Public RptA As Long, RptB As Long
Public LastCover$, 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 PlayUnit As Integer 'current playback unit (0 or 1)

Dim FSize(2) As Coord
Dim PolyPt() As Coord, PolyNum() As Long
Dim Kbd(50) As String * 1
Dim cx(50) As Integer, cy(50) As Integer
Dim Di(5) As DEx, Sli(4) As DEx
'

'The Main initialization routines
Private Sub Form_Load()
    
    TwipX = Screen.TwipsPerPixelX
    TwipY = Screen.TwipsPerPixelY
    
    'Load objects
    For A = 1 To 50: Load Btn(A): Btn(A).Caption = "": Next
    For A = 1 To 20: Load Lbl(A): Lbl(A).Caption = "": Next
    For A = 1 To 16: Load Ind(A): Next
    For A = 1 To 1: Load Img(A): Next
    For A = 1 To 5: Load Dig(A): Next
    For A = 1 To 4: Load iSlider(A): Next

    Prg = "vbamppro": Sect = "config"
    Lbl(1).Alignment = 1 'right justify time
    
    'get option settings
    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))
    OptStartPlaylist = GetSetting$(Prg, Sect, "StartPlaylist", "")
    OptStartFreq = GetSetting$(Prg, Sect, "StartFreq", "87.5")
    OptSkinName = GetSetting$(Prg, Sect, "Skin", "")
    OptSkinPath = GetSetting$(Prg, Sect, "SkinPath", "")
    OptTimeFmt = Val(GetSetting$(Prg, Sect, "TimeFmt", ""))
    OptVisPLPath = GetSetting$(Prg, Sect, "VisPLPath", "")
    OptClrPl = Val(GetSetting$(Prg, Sect, "ClearPLFirst", ""))
    OptAutoPlay = Val(GetSetting$(Prg, Sect, "AutoPlay", ""))
    OptValExt = GetSetting$(Prg, Sect, "ValidExt", "")
    OptPBOverlap = Val(GetSetting$(Prg, Sect, "PBOverlap", OptPBOverlap))
    
    X = Val(GetSetting$(Prg, Sect, "X", Me.Left))
    Y = Val(GetSetting$(Prg, Sect, "Y", Me.Top))
    
    Me.Move X, Y
       
    If Exists(OptSkinName) = False Then OptSkinName = "": MsgBox "Previously selected skin not found (" & OptSkinName & ")! Using default"
    If OptSkinName = "" Then OptSkinName = App.Path + "\default.skin"
    F$ = OptSkinName
    
    PlayUnit = 0
    TNum = 1
        
    Stereo = True
    Playing = False
    Paused = False
    Intro = False
    STP = False
    Repeat = False
    
    Call ClearInf
    Call LoadSkin(ByVal F$)
    Call LoadAutoList
    Call MakeDayStr
       
    
    If OptStartMin = 1 Then Me.Visible = False
    
    Load frmIcon 'system tray icon/menu
    
    'Handle file(s) from command-line
    If Command$ <> "" Then
        AddPath = Command$
        AddName = "Commandline"
        AddTitle = MakeTitle$(AddPath)
        Call PlAddFile
        TNum = 1: Call PlayIt
    Else
        If OptStartMd = 1 Then GoSub LoadLast

⌨️ 快捷键说明

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