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

📄 bofang.frm

📁 一个较为完整的校园铃声控制系统。可以任意设置时间次数。
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form bofang 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "打开歌曲播放"
   ClientHeight    =   3135
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   2820
   Icon            =   "bofang.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "bofang.frx":628A
   ScaleHeight     =   3135
   ScaleWidth      =   2820
   StartUpPosition =   2  '屏幕中心
   Begin VB.ListBox List1 
      Height          =   2220
      Left            =   0
      TabIndex        =   3
      Top             =   840
      Width           =   2820
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   840
      Top             =   120
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command3 
      BackColor       =   &H0080FF80&
      Height          =   735
      Left            =   1920
      Picture         =   "bofang.frx":5FAC4
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   0
      Width           =   855
   End
   Begin VB.CommandButton command2 
      BackColor       =   &H00C0E0FF&
      Height          =   735
      Left            =   960
      Picture         =   "bofang.frx":6239A
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   0
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FF0000&
      Height          =   735
      Left            =   0
      Picture         =   "bofang.frx":62C64
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   0
      Width           =   855
   End
   Begin MSComDlg.CommonDialog CmD1 
      Left            =   2640
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
End
Attribute VB_Name = "bofang"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub Command1_Click()


Me.CmD1.DialogTitle = "打开歌曲(亚森江)"
CmD1.Filter = "mp3file(*.mp3)|*.mp3|datfile(*.dat)|*.dat|waveaudiofile(*.wav)|*.wav|mpegfile(*.mpg)|*.mpg|mp4file(*.mp4)|*.mp4|所有文件(*.*)|*.*"
CmD1.ShowOpen
bofangqi.yasen.URL = CmD1.FileName
bofangqi.yasen.Controls.stop
End Sub



Private Sub command2_Click()
Dim DlgInfo As DlgFileInfo
    Dim I As Integer
    
    On Error GoTo ErrHandle
    
    '清除List1中的项
    List1.Clear
    
    '选择文件
    With CommonDialog1
        .CancelError = True
        .MaxFileSize = 32767 '被打开的文件名尺寸设置为最大,即32K
        .Flags = cdlOFNHideReadOnly Or cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNNoDereferenceLinks
        .DialogTitle = "选择文件"
        .Filter = "所有类型的文件(*.*)|*.*"
        .ShowOpen
         DlgInfo = GetDlgSelectFileInfo(.FileName)
        .FileName = ""      '在打开了*.pif文件后须将Filename属性置空,
                            '否则当选取多个*.pif文件后,当前路径会改变
                            
         bofangqi.yasen.URL = Me.List1.Text
    End With
    
    For I = 1 To DlgInfo.iCount
        List1.AddItem DlgInfo.sPath & DlgInfo.sFile(I)
    Next I
    
    Exit Sub
 ' 按了“取消”按钮
ErrHandle:

   
    bofangqi.yasen.Controls.stop
End Sub

Private Sub Command3_Click()
Load bofangqi
bofangqi.show
Me.Visible = False
  '播放
 
     bofangqi.yasen.Controls.play
End Sub

Private Sub Form_Activate()
 
     If List1.ListIndex < List1.ListCount - 1 Then
        List1.ListIndex = List1.ListIndex + 1
        bofangqi.yasen.URL = List1.Text
'        bofangqi.yasen.autoStart = True
     End If
  
End Sub

Private Sub List1_Click()
bofangqi.yasen.URL = Me.List1.Text
End Sub

⌨️ 快捷键说明

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