Solved

MCI Movie code needed

Posted on 1997-06-03
5
189 Views
Last Modified: 2012-05-04
I recently uprgaded from vb3 to vb4 and don't know how to make the mci32.ocx access or show a movie file such as mmm or mov. Could someone please give me a simple code example on this please.
0
Comment
Question by:cross060397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:cross060397
ID: 1426775
Edited text of question
0
 

Expert Comment

by:Lucas041697
ID: 1426776
Example
The following example illustrates the procedure used to open an MCI device with a compatible data file. By placing this code in the Form_Load procedure, your application can use the multimedia MCI control “as is” to play, record, and rewind the multimedia file GONG.WAV. To try this example, first create a form with a multimedia MCI control.
 
Private Sub Form_Load ()
      ' Set properties needed by MCI to open.
      Form1.MMControl1.Notify = FALSE
      Form1.MMControl1.Wait = TRUE
      Form1.MMControl1.Shareable = FALSE
      Form1.MMControl1.DeviceType = "WaveAudio"
      Form1.MMControl1.FileName = "C:\WINDOWS\DING.WAV"

      ' Open the MCI WaveAudio device.
      Form1.MMControl1.Command = "Open"
End Sub

 
To properly manage multimedia resources, you should close those MCI devices that are open before exiting your application. You can place the following statement in the Form_Unload procedure to close an open MCI device before exiting from the form containing the multimedia MCI custom control.
 
Private Sub Form_Unload ()
      MMControl1.Command = "Close"
End Sub

----------------------------------------
DEVICETYPE PROPERTY
 
Description
Specifies the type of MCI device to open.
Syntax
[form.]MMControl.DeviceType[ = device$]
 
Remarks
The argument device$ is the type of MCI device to open: AVIVideo, CDAudio, DAT, DigitalVideo, MMMovie, Other, Overlay, Scanner, Sequencer, VCR, Videodisc, or WaveAudio.
The value of this property must be set when opening simple devices (such as an audio CD that does not use files). It must also be set when opening compound MCI devices when the file-name extension does not specify the device to use.

Data Type
String

0
 

Author Comment

by:cross060397
ID: 1426777
I found code to play wav files but I still haven't been shown the code for video files. Maybe I'm missing something but how do you get the video to show up? Is it a seperate form for that or what?
0
 

Author Comment

by:cross060397
ID: 1426778
I'm sorry Lucas, I did some playing around and got it to work using your code. Do you know how to make the video windows a child in a MDI form?
0
 
LVL 7

Accepted Solution

by:
tward earned 50 total points
ID: 1426779
Try the Following as this works for me with .AVI files, it should work with other video types also.

Hope this helps you!

  MMControl1.hWndDisplay = Form1.hWnd
  MMControl1.filename = "C:\DOS\TEMP\VCWELCOM.AVI"
  MMControl1.Command = "Open"
  MMControl1.Command = "Play"

0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question