home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmMCIVBX
- BackColor = &H00C0C0C0&
- Caption = "MCI.VBX Standard Control"
- ClientHeight = 1230
- ClientLeft = 1530
- ClientTop = 3870
- ClientWidth = 7170
- Height = 1920
- Left = 1470
- LinkTopic = "Form2"
- ScaleHeight = 1230
- ScaleWidth = 7170
- Top = 3240
- Width = 7290
- Begin MMControl MMControl1
- EjectVisible = 0 'False
- Height = 495
- Left = 2040
- RecordVisible = 0 'False
- TabIndex = 0
- Top = 600
- Width = 2760
- End
- Begin Label Label1
- BackColor = &H00C0C0C0&
- Caption = "Select Open from the File menu to open a multimedia file."
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 5895
- End
- Begin Menu mnuFile
- Caption = "&File"
- Begin Menu mnuFile_Open
- Caption = "&Open"
- End
- End
- Sub Form_Load ()
- ' Set properties needed by MMControl
- MMControl1.Notify = False
- MMControl1.Wait = True
- MMControl1.Shareable = False
- ' Prompt user to open a multimedia file
- Label1.Caption = "Select Open from the File menu."
- End Sub
- Sub Form_Unload (Cancel As Integer)
- MMControl1.Command = "Close"
- End Sub
- Sub mnuFile_Open_Click ()
- ' Display the File Open... dialog.
- OpenDlg.CMDialog1.FilterIndex = 1
- OpenDlg.CMDialog1.Filter = "AVI Files (*.avi)|*.avi|Wave Files (*.wav)|*.wav|All Files (*.*)|*.*"
- OpenDlg.CMDialog1.Flags = OFN_READONLY Or OFN_FILEMUSTEXIST
- OpenDlg.CMDialog1.CancelError = True
- OpenDlg.CMDialog1.Filename = ""
- On Error Resume Next
- OpenDlg.CMDialog1.Action = 1
- If Err <> 0 Then
- ' No file selected from the "Open File..." dialog.
- Exit Sub
- End If
- ' Close any open multimedia files that are
- ' associated with MMControl1.
- MMControl1.Command = "Close"
- ' Pass the filename value into the MMControl
- MMControl1.Filename = OpenDlg.CMDialog1.Filename
- ' Open the MCI device.
- MMControl1.Command = "Open"
- ' Display the name of the opened file.
- Label1.Caption = OpenDlg.CMDialog1.Filename
- End Sub
-