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

📄 frmoptions.frm

📁 一个类似于WinAmp的Mp3播放器,功能不错,有换肤等功能,是一个不错的vb播放器.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Width           =   540
         End
      End
      Begin VB.Frame Frame3 
         Caption         =   "Options"
         Height          =   1575
         Left            =   -74865
         TabIndex        =   17
         Top             =   420
         Width           =   2535
         Begin VB.CheckBox cbAutoEn 
            Caption         =   "Enable Auto On/Off"
            Height          =   255
            Left            =   90
            TabIndex        =   40
            Top             =   225
            Width           =   1995
         End
         Begin VB.CheckBox cbMinOnSnz 
            Caption         =   "Minimize on Off/Snooze"
            Height          =   255
            Left            =   90
            TabIndex        =   18
            Top             =   480
            Width           =   1995
         End
      End
      Begin VB.Frame Frame4 
         Caption         =   "DirAdd Extensions"
         Height          =   660
         Left            =   105
         TabIndex        =   16
         Top             =   405
         Width           =   7200
         Begin VB.TextBox ValExt 
            Height          =   315
            Left            =   105
            TabIndex        =   44
            Text            =   "MP2 MP3 MID WAV MOD XM AVI MOV"
            Top             =   240
            Width           =   6975
         End
      End
      Begin VB.Frame Frame6 
         Caption         =   "Startup"
         Height          =   1815
         Left            =   105
         TabIndex        =   10
         Top             =   1095
         Width           =   3195
         Begin VB.CommandButton cSelFile 
            Caption         =   "...F"
            Height          =   285
            Left            =   2130
            TabIndex        =   64
            Top             =   645
            Width           =   465
         End
         Begin VB.CommandButton cSelDir 
            Caption         =   "..D"
            Height          =   285
            Left            =   2625
            TabIndex        =   63
            Top             =   645
            Width           =   435
         End
         Begin VB.OptionButton StartOpt 
            Caption         =   "File or Directory:"
            Height          =   255
            Index           =   2
            Left            =   90
            TabIndex        =   15
            Top             =   690
            Width           =   1875
         End
         Begin VB.TextBox StartFile 
            Height          =   285
            Left            =   315
            TabIndex        =   14
            Top             =   960
            Width           =   2745
         End
         Begin VB.OptionButton StartOpt 
            Caption         =   "Last Playlist"
            Height          =   255
            Index           =   1
            Left            =   90
            TabIndex        =   13
            Top             =   435
            Width           =   1335
         End
         Begin VB.OptionButton StartOpt 
            Caption         =   "Blank Playlist"
            Height          =   195
            Index           =   0
            Left            =   90
            TabIndex        =   12
            Top             =   225
            Width           =   2010
         End
         Begin VB.CheckBox cbStartMin 
            Caption         =   "Start Minimized"
            Height          =   255
            Left            =   90
            TabIndex        =   11
            Top             =   1455
            Width           =   1515
         End
      End
      Begin VB.Frame Frame5 
         Caption         =   "Shutdown"
         Height          =   645
         Left            =   120
         TabIndex        =   8
         Top             =   2925
         Width           =   3195
         Begin VB.CheckBox cbSaveWin 
            Caption         =   "Save Window Position"
            Height          =   255
            Left            =   90
            TabIndex        =   9
            Top             =   255
            Width           =   1995
         End
      End
      Begin VB.Frame Frame9 
         Caption         =   "Skin"
         Height          =   3900
         Left            =   -74910
         TabIndex        =   6
         Top             =   375
         Width           =   7260
         Begin VB.CommandButton cSelSkin 
            Caption         =   "Select Skin"
            Height          =   345
            Left            =   105
            TabIndex        =   53
            Top             =   3465
            Width           =   1605
         End
         Begin VB.Label SkinInf 
            BackColor       =   &H80000016&
            Caption         =   "?"
            Height          =   3120
            Left            =   105
            TabIndex        =   7
            Top             =   240
            Width           =   7035
            WordWrap        =   -1  'True
         End
      End
      Begin VB.Frame fraSample1 
         Caption         =   "Window"
         Height          =   765
         Left            =   3390
         TabIndex        =   3
         Top             =   1110
         Width           =   3900
         Begin VB.CheckBox cbOnTop 
            Caption         =   "&Always on top"
            Height          =   255
            Left            =   90
            TabIndex        =   5
            Top             =   195
            Width           =   1395
         End
         Begin VB.CheckBox cbSnap 
            Caption         =   "Snap to &Viewpoint"
            Height          =   255
            Left            =   90
            TabIndex        =   4
            Top             =   450
            Width           =   1680
         End
      End
   End
   Begin VB.Label txtCp 
      Alignment       =   2  'Center
      BackColor       =   &H80000018&
      Caption         =   "(C)1999  Steve J. Gray -  V1.06  Nov 21/1999"
      Height          =   315
      Left            =   60
      TabIndex        =   1
      Top             =   4515
      Width           =   6255
   End
End
Attribute VB_Name = "Pref"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'VB-Amp Pro Preferences
'======================
' Displays a preferences window with several tabs.
' Program options are defined as public variables accessable
' by all forms. On load these variables are used to set
' text-boxes and check-boxes etc. When an option is changed
' it changes the variable, either immediately or on exiting.

Dim SrcFile As String

Private Sub cbAutoPlay_Click()
    OptAutoPlay = cbAutoPlay.Value
End Sub

Private Sub cbFriendly_Click()
    OptFriendly = cbFriendly.Value
End Sub

Private Sub cbScrollName_Click()
    OptScrollName = cbScrollName.Value
End Sub

Private Sub cbTagCover_Click()
    OptUseTagCover = cbTagCover.Value
End Sub

Private Sub cSelDir_Click()
Dim A As String
    A = GetBrowseDir(Me, "Select Start File/Directory:")
    If A <> "" Then StartFile.Text = A
End Sub



Private Sub cSelFile_Click()
    Static LastFilter As Long
    
    If LastFilter = 0 Then LastFilter = 1
        
    On Error GoTo ErrHandler
    
    CommonDialog1.CancelError = True
    CommonDialog1.InitDir = OptDefPath
    CommonDialog1.DialogTitle = "Open Media file"
    CommonDialog1.Flags = cdlOFNHideReadOnly
    CommonDialog1.Filter = "MPEG Audio Files|*.MP?|ActiveMovie Files|*.MP?;*.MPEG;*.DAT;*.WAV;*.AU;*.MID;*.RMI;*.AIF?;*.MOV;*.QT;*.AVI;*.M1V;*.RA;*.RAM;*.RM;*.RMM|Music Modules|*.MOD;*.MTM;*FAR;*.669;*.OKT;*.STM;*.S3M;*.NST;*.WOW;*.XM|Bitmaps|*.BMP;*.GIF;*.JPG|Playlists|*.M3U;*.PLS|All Files|*.*"
    CommonDialog1.FilterIndex = LastFilter
    CommonDialog1.Filename = ""
    
    CommonDialog1.ShowOpen
    DoEvents
    
    StartFile.Text = CommonDialog1.Filename
        
ErrHandler:
End Sub

Private Sub Form_Activate()
Dim J As Integer, i As Integer
    J = frmVBAmp.AutoList.ListCount
    For i = 0 To J - 1
      OOList.List(i) = frmVBAmp.AutoList.List(i)
    Next
    SkinInf.Caption = SkinInfo
End Sub

Private Sub Form_Load()

    'center the form
    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    
    'set options according to prefs
    cbOnTop.Value = OptAlwaysOnTop
    cbSnap.Value = OptSnap
    cbSaveWin.Value = OptSavePos
    cbAutoEn.Value = OptAuto
    cbAutoPlay.Value = OptAutoPlay
    cbClrPl.Value = OptClrPl
    cbScrollName.Value = OptScrollName
    cbSnoozeEn.Value = OptSnooze
    cbTagCover.Value = OptUseTagCover
    cbMinOnSnz.Value = OptMinOnSnz
    cbStartMin.Value = OptStartMin
    cbFriendly.Value = OptFriendly
    cbTimeFmt.Value = OptTimeFmt
    
    SnzMd(OptSnoozeMd).Value = True
    SnoozeAt.Text = OptSnoozeAt
    StartOpt(OptStartMd).Value = True
    StartFile.Text = OptStartFile
    SkinPath.Text = OptSkinPath
    VisPLD.Text = OptVisPLPath
    ValExt.Text = UCase(OptValExt)
    PBOverlap.Text = OptPBOverlap
    
    OODay.ListIndex = 9
    SnzMin.ListIndex = 5
    SkinInf.Caption = SkinInfo
    
    Call optView_Click(0)
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Call AlwaysOnTop(frmVBAmp, OptAlwaysOnTop)
End Sub

Private Sub cbOnTop_Click()
    OptAlwaysOnTop = cbOnTop.Value
    Call AlwaysOnTop(frmVBAmp, OptAlwaysOnTop)
End Sub

Private Sub cbAutoEn_Click()
    OptAuto = cbAutoEn.Value
End Sub

Private Sub cbClrPl_Click()
    OptClrPl = cbClrPl.Value
End Sub

Private Sub cSelSkin_Click()
    Call frmVBAmp.SelectSkin
    SkinInf.Caption = SkinInfo
End Sub

Private Sub cSetSkinDir_Click()
Dim A As String
    A = GetBrowseDir(Me, "Select Skin Directory:")
    If A <> "" Then SkinPath.Text = A
    OptSkinPath = A
End Sub

Private Sub cSetVPD_Click()
Dim A As String
    A = GetBrowseDir(Me, "Select Initial VisPL Directory:")
    If A <> "" Then VisPLD.Text = A
    OptVisPLPath = A
End Sub

Private Sub cbMinOnSnz_Click()
    OptMinOnSnz = cbMinOnSnz.Value
End Sub

Private Sub OOAddBtn_Click()
Dim A As String
    A = Left(OODay.List(OODay.ListIndex), 1)
    A = A & " " & Left(OOOnTime.Text + "     ", 5)
    A = A & " " & Left(OOOffTime.Text + "     ", 5)
    A = A & " " & Format(Val(OOPreset.Text), "00")
    If Mid(A, 3, 11) <> "00:00 00:00" Then
        OOList.AddItem A: Call SetAutoList
    End If
End Sub

Private Sub OODelBtn_Click()
Dim n As Integer
    n = OOList.ListIndex
    If n >= 0 Then OOList.RemoveItem n
    If n > OOList.ListCount - 1 Then n = OOList.ListCount - 1
    If n >= 0 Then OOList.ListIndex = n
    Call SetAutoList
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOk_Click()
    Unload Me
End Sub

Private Sub optView_Click(Index As Integer)
   Dim F As String
   Select Case Index
     Case 0: F = "vbamppro.txt"
     Case 1: F = "readme.txt"
     Case 2: F = "skins.txt"
     Case 3: F = "credits.txt"
   End Select
   Call LoadTxt(F)
End Sub

Private Sub LoadTxt(F As String)
Dim FIO2 As Integer
    SrcFile = App.Path & "\" & F
    If Dir(SrcFile) <> "" Then
      FIO2 = FreeFile
      Open SrcFile For Input As FIO2
      txtMsg.Text = Input(LOF(FIO2), FIO2)
      Close FIO2
    Else
      txtMsg.Text = "Could not open file!"
    End If
End Sub

Private Sub cbSaveWin_Click()
    OptSavePos = cbSaveWin.Value
End Sub

Private Sub PBOverlap_Change()
    OptPBOverlap = Val(PBOverlap.Text)
End Sub

Private Sub SkinPath_Change()
    OptSkinPath = SkinPath.Text
End Sub

Private Sub cbSnap_Click()
    OptSnap = cbSnap.Value
End Sub

Private Sub SnoozeAt_Change()
    OptSnoozeAt = SnoozeAt.Text
End Sub

Private Sub cbSnoozeEn_Click()
    OptSnooze = cbSnoozeEn.Value
    SnoozeTm = -Abs(SnoozeTm)
End Sub

Private Sub SnzMd_Click(Index As Integer)
    OptSnoozeMd = Index
End Sub

Private Sub SnzMin_Click()
    SnoozeTm = -Val(SnzMin.List(SnzMin.ListIndex))
End Sub

Private Sub cbStartMin_Click()
    OptStartMin = cbStartMin.Value
End Sub

Private Sub StartPreset_Change()
    OptStartPlaylist = StartPlaylist.Text
End Sub

Private Sub cbTimeFmt_Click()
    OptTimeFmt = cbTimeFmt.Value
End Sub

Private Sub StartOpt_Click(Index As Integer)
    OptStartMd = Index
End Sub

Private Sub StartFile_Change()
    OptStartFile = StartFile.Text
End Sub

Private Sub txtMsg_KeyPress(KeyAscii As Integer)
    KeyAscii = 0
End Sub

Private Sub SetAutoList()
Dim i As Integer
    FM.AutoList.Clear
    For i = 0 To OOList.ListCount - 1
        frmVBAmp.AutoList.List(i) = OOList.List(i)
    Next
End Sub

Private Sub ValExt_Change()
    OptValExt = UCase(ValExt.Text)
End Sub

⌨️ 快捷键说明

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