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

📄 mci.frm

📁 VB源码,是初学者的福因.让你很快掌握VB编程
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "MCI Sample by Matt Hart mhart@taascforce.com"
   ClientHeight    =   4800
   ClientLeft      =   1650
   ClientTop       =   1950
   ClientWidth     =   8055
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   4800
   ScaleWidth      =   8055
   Begin VB.CommandButton Command18 
      Caption         =   "Eject CD"
      Height          =   315
      Left            =   1980
      TabIndex        =   12
      Top             =   2820
      Width           =   855
   End
   Begin VB.CommandButton Command17 
      Caption         =   "Next CD Track"
      Height          =   315
      Left            =   1500
      TabIndex        =   28
      Top             =   3180
      Width           =   1335
   End
   Begin VB.CommandButton Command16 
      Caption         =   "Prev CD Track"
      Height          =   315
      Left            =   120
      TabIndex        =   27
      Top             =   3180
      Width           =   1335
   End
   Begin VB.PictureBox Picture2 
      AutoRedraw      =   -1  'True
      BorderStyle     =   0  'None
      Height          =   975
      Left            =   6300
      ScaleHeight     =   975
      ScaleWidth      =   1755
      TabIndex        =   26
      Top             =   1440
      Visible         =   0   'False
      Width           =   1755
   End
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      BorderStyle     =   0  'None
      Height          =   975
      Left            =   6240
      ScaleHeight     =   975
      ScaleWidth      =   1755
      TabIndex        =   25
      Top             =   2940
      Visible         =   0   'False
      Width           =   1755
   End
   Begin VB.CommandButton Command15 
      Caption         =   "Copy AVI Image"
      Height          =   495
      Left            =   1500
      TabIndex        =   15
      Top             =   4200
      Width           =   1335
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   7560
      Top             =   4200
   End
   Begin VB.CommandButton Command14 
      Caption         =   "MID Vol UP"
      Height          =   375
      Left            =   120
      TabIndex        =   8
      Top             =   2340
      Width           =   1215
   End
   Begin VB.CommandButton Command13 
      Caption         =   "MID Vol DN"
      Height          =   375
      Left            =   1620
      TabIndex        =   9
      Top             =   2340
      Width           =   1215
   End
   Begin VB.CommandButton Command12 
      Caption         =   "WAV Vol DN"
      Height          =   375
      Left            =   1620
      TabIndex        =   5
      Top             =   1260
      Width           =   1215
   End
   Begin VB.CommandButton Command11 
      Caption         =   "WAV Vol UP"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   1260
      Width           =   1215
   End
   Begin VB.CommandButton Command10 
      Caption         =   "Play Recorded WAV"
      Height          =   495
      Left            =   120
      TabIndex        =   14
      Top             =   4200
      Width           =   1275
   End
   Begin VB.CommandButton Command9 
      Caption         =   "Play CD && Record to WAV"
      Height          =   495
      Left            =   120
      TabIndex        =   13
      Top             =   3600
      Width           =   2715
   End
   Begin VB.Frame Frame1 
      Caption         =   "Movie!"
      Height          =   2655
      Left            =   3000
      TabIndex        =   16
      Top             =   60
      Width           =   4935
   End
   Begin VB.CommandButton Command8 
      Caption         =   "Stop CD"
      Height          =   315
      Left            =   1020
      TabIndex        =   11
      Top             =   2820
      Width           =   855
   End
   Begin VB.CommandButton Command7 
      Caption         =   "Stop AVI"
      Height          =   495
      Left            =   1620
      TabIndex        =   3
      Top             =   660
      Width           =   1215
   End
   Begin VB.CommandButton Command6 
      Caption         =   "Stop MID"
      Height          =   495
      Left            =   1620
      TabIndex        =   7
      Top             =   1740
      Width           =   1215
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Stop WAV"
      Height          =   495
      Left            =   1620
      TabIndex        =   1
      Top             =   60
      Width           =   1215
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Play CD"
      Height          =   315
      Left            =   120
      TabIndex        =   10
      Top             =   2820
      Width           =   795
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Play AVI"
      Height          =   495
      Left            =   120
      TabIndex        =   2
      Top             =   660
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Play MID"
      Height          =   495
      Left            =   120
      TabIndex        =   6
      Top             =   1740
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Play WAV"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   60
      Width           =   1215
   End
   Begin VB.PictureBox ProgressBar4 
      Height          =   375
      Left            =   3720
      ScaleHeight     =   315
      ScaleWidth      =   4035
      TabIndex        =   24
      Top             =   4320
      Width           =   4095
   End
   Begin VB.PictureBox ProgressBar3 
      Height          =   375
      Left            =   3720
      ScaleHeight     =   315
      ScaleWidth      =   4035
      TabIndex        =   21
      Top             =   3840
      Width           =   4095
   End
   Begin VB.PictureBox ProgressBar2 
      Height          =   375
      Left            =   3720
      ScaleHeight     =   315
      ScaleWidth      =   4035
      TabIndex        =   20
      Top             =   3360
      Width           =   4095
   End
   Begin VB.PictureBox ProgressBar1 
      Height          =   375
      Left            =   3720
      ScaleHeight     =   315
      ScaleWidth      =   4035
      TabIndex        =   17
      Top             =   2880
      Width           =   4095
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "CD"
      Height          =   255
      Left            =   3000
      TabIndex        =   23
      Top             =   4440
      Width           =   615
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "MID"
      Height          =   255
      Left            =   3000
      TabIndex        =   22
      Top             =   3960
      Width           =   615
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "AVI"
      Height          =   255
      Left            =   3000
      TabIndex        =   19
      Top             =   3480
      Width           =   615
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "WAV"
      Height          =   255
      Left            =   3000
      TabIndex        =   18
      Top             =   3000
      Width           =   615
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

' MCI Sample by Matt Hart - mhart@taascforce.com
' http://ourworld.compuserve.com/homepages/matthart
' http://www.webczar.com/defcon
' http://www.webczar.com/defcon/mh/vbhelp.html
'
' You don't need the MCI32.OCX file to create some great Multimedia
' VB apps - when you know the right commands.
' All you need is available through mciSendString.  Experiment
' with the calls and commands to see what you can do - it took me
' about 10 minutes of experimenting to finally get an AVI movie to play
' in a frame.  Enjoy!

Private Declare Function auxGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
Private Declare Function mciGetDeviceID Lib "winmm.dll" Alias "mciGetDeviceIDA" (ByVal lpstrName As String) As Long
Private Declare Function mciSendCommand Lib "winmm.dll" Alias "mciSendCommandA" (ByVal wDeviceID As Long, ByVal uMessage As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Long) As Long
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Declare Function midiOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
Private Declare Function midiOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Declare Function waveOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
Private Declare Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long

Private Type lVolType
    v As Long
End Type

Private Type VolType
    lv As Integer
    rv As Integer

⌨️ 快捷键说明

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