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

📄 frmoptions.frm

📁 一个无需MP3控件的MP3播放器源码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Width           =   1035
         End
         Begin VB.TextBox SnoozeAt 
            Height          =   315
            Left            =   1140
            MaxLength       =   5
            TabIndex        =   21
            Text            =   "00:00"
            Top             =   540
            Width           =   555
         End
         Begin VB.Label Label8 
            AutoSize        =   -1  'True
            Caption         =   "minutes"
            Height          =   195
            Left            =   1740
            TabIndex        =   26
            Top             =   240
            Width           =   540
         End
      End
      Begin VB.Frame Frame3 
         Caption         =   "Options"
         Height          =   1575
         Left            =   -74865
         TabIndex        =   18
         Top             =   420
         Width           =   2535
         Begin VB.CheckBox cbAutoEn 
            Caption         =   "Enable Auto On/Off"
            Height          =   255
            Left            =   90
            TabIndex        =   41
            Top             =   225
            Width           =   1995
         End
         Begin VB.CheckBox cbMinOnSnz 
            Caption         =   "Minimize on Off/Snooze"
            Height          =   255
            Left            =   90
            TabIndex        =   19
            Top             =   480
            Width           =   1995
         End
      End
      Begin VB.Frame Frame4 
         Caption         =   "DirAdd Extensions"
         Height          =   660
         Left            =   -74895
         TabIndex        =   17
         Top             =   405
         Width           =   5685
         Begin VB.TextBox ValExt 
            Height          =   315
            Left            =   105
            TabIndex        =   45
            Text            =   "MP2 MP3 MID WAV MOD XM AVI MOV"
            Top             =   240
            Width           =   5445
         End
      End
      Begin VB.Frame Frame6 
         Caption         =   "Startup"
         Height          =   1425
         Left            =   -74895
         TabIndex        =   10
         Top             =   1095
         Width           =   2550
         Begin VB.OptionButton TuneOpt 
            Caption         =   "File:"
            Height          =   255
            Index           =   2
            Left            =   675
            TabIndex        =   15
            Top             =   750
            Width           =   615
         End
         Begin VB.TextBox StartPlaylist 
            Height          =   285
            Left            =   1290
            MaxLength       =   2
            TabIndex        =   14
            Top             =   735
            Width           =   1200
         End
         Begin VB.OptionButton TuneOpt 
            Caption         =   "Last Loaded"
            Height          =   255
            Index           =   1
            Left            =   675
            TabIndex        =   13
            Top             =   480
            Width           =   1470
         End
         Begin VB.OptionButton TuneOpt 
            Caption         =   "None"
            Height          =   195
            Index           =   0
            Left            =   675
            TabIndex        =   12
            Top             =   240
            Width           =   1155
         End
         Begin VB.CheckBox cbStartMin 
            Caption         =   "Start Minimized"
            Height          =   255
            Left            =   105
            TabIndex        =   11
            Top             =   1080
            Width           =   1515
         End
         Begin VB.Label Label10 
            Caption         =   "Playlist:"
            Height          =   255
            Left            =   120
            TabIndex        =   16
            Top             =   240
            Width           =   675
         End
      End
      Begin VB.Frame Frame5 
         Caption         =   "Shutdown"
         Height          =   900
         Left            =   -74895
         TabIndex        =   8
         Top             =   2595
         Width           =   2565
         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          =   3105
         Left            =   90
         TabIndex        =   6
         Top             =   375
         Width           =   5700
         Begin VB.CommandButton cSelSkin 
            Caption         =   "Select Skin"
            Height          =   345
            Left            =   105
            TabIndex        =   54
            Top             =   2655
            Width           =   1605
         End
         Begin VB.Label SkinInf 
            BackColor       =   &H80000016&
            Caption         =   "?"
            Height          =   2325
            Left            =   105
            TabIndex        =   7
            Top             =   240
            Width           =   5475
            WordWrap        =   -1  'True
         End
      End
      Begin VB.Frame fraSample1 
         Caption         =   "Window"
         Height          =   765
         Left            =   -72255
         TabIndex        =   3
         Top             =   1095
         Width           =   3060
         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.02  Jan 13/1999"
      Height          =   270
      Left            =   75
      TabIndex        =   1
      Top             =   3780
      Width           =   4635
   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 Form_Activate()
    J = frmVBAmp.AutoList.ListCount
    For I = 0 To J - 1
      OOList.List(I) = frmVBAmp.AutoList.List(I)
    Next
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
    cbSnoozeEn.Value = OptSnooze
    SnzMd(OptSnoozeMd).Value = True
    SnoozeAt.Text = OptSnoozeAt
    cbMinOnSnz.Value = OptMinOnSnz
    TuneOpt(OptStartMd).Value = True
    cbStartMin.Value = OptStartMin
    StartPlaylist.Text = OptStartPlaylist
    SkinPath.Text = OptSkinPath
    cbTimeFmt.Value = OptTimeFmt
    VisPLD.Text = OptVisPLPath
    ValExt.Text = 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
End Sub

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

Private Sub cSetVPD_Click()
    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()
    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()
    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$)
    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 TuneOpt_Click(Index As Integer)
    OptStartMd = Index
End Sub

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

Private Sub SetAutoList()
    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 = ValExt.Text
End Sub

⌨️ 快捷键说明

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