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

📄 form1.frm

📁 本文件包含200个visual baisc实例
💻 FRM
字号:
VERSION 5.00
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Begin VB.Form form1 
   Caption         =   "播放指定avi-mid-wav文件"
   ClientHeight    =   1755
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6555
   LinkTopic       =   "Form1"
   ScaleHeight     =   1755
   ScaleWidth      =   6555
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command3 
      Caption         =   "播放avi"
      Height          =   495
      Left            =   3330
      TabIndex        =   4
      Top             =   660
      Width           =   1440
   End
   Begin VB.CommandButton Command2 
      Caption         =   "播放wav"
      Height          =   495
      Left            =   1770
      TabIndex        =   3
      Top             =   660
      Width           =   1440
   End
   Begin VB.CommandButton Command1 
      Caption         =   "播放mid"
      Height          =   495
      Left            =   210
      TabIndex        =   2
      Top             =   660
      Width           =   1440
   End
   Begin VB.CommandButton Command4 
      Caption         =   "退出"
      Height          =   495
      Left            =   4905
      TabIndex        =   1
      Top             =   660
      Width           =   1440
   End
   Begin MCI.MMControl mci1 
      Height          =   420
      Left            =   1815
      TabIndex        =   0
      Top             =   300
      Width           =   3585
      _ExtentX        =   6324
      _ExtentY        =   741
      _Version        =   393216
      PrevEnabled     =   -1  'True
      PlayEnabled     =   -1  'True
      PauseEnabled    =   -1  'True
      StepEnabled     =   -1  'True
      StopEnabled     =   -1  'True
      RecordEnabled   =   -1  'True
      Silent          =   -1  'True
      Shareable       =   -1  'True
      DeviceType      =   ""
      FileName        =   ""
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
 ' 初始化mci设备
  mci1.Visible = False
  mci1.Notify = True
  mci1.Shareable = False
  mci1.TimeFormat = 0
End Sub

Private Sub Command1_Click()         '播放mid音乐
  mci1.Command = "CLOSE"
  mci1.Notify = False
  mci1.Wait = True
  mci1.FileName = App.Path & "\Mcitest.mid"
  mci1.Command = "open"
  mci1.Notify = True
  mci1.Wait = False
  mci1.Command = "play"
End Sub

Private Sub Command2_Click()         '播放wav音乐
  mci1.Command = "CLOSE"
  mci1.Notify = False
  mci1.Wait = True
  mci1.FileName = App.Path & "\Chimes.wav"
  mci1.Command = "open"
  mci1.Notify = True
  mci1.Wait = False
  mci1.Command = "play"
End Sub

Private Sub Command3_Click()         '播放avi文件
  mci1.Command = "CLOSE"
  mci1.Notify = False
  mci1.Wait = True
  mci1.FileName = App.Path & "\test.avi"
  mci1.Command = "open"
  mci1.Notify = True
  mci1.Wait = False
  mci1.Command = "play"
End Sub

Private Sub Command4_Click()
  End
End Sub



⌨️ 快捷键说明

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