Results 1 to 6 of 6

Thread: mci control

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    Gers France
    Posts
    8

    mci control

    Hi

    How to use mci control to process a video in real time?

  2. #2
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    If you mean the "MControl" then:

    MControl.Command = "close"
    MControl.DeviceType = "AVIVideo"
    MControl.FileName = "Path to your avi file here"
    MControl.Command = "open"
    MControl.Command = "Play"

    From MSDN:

    The argument device$ is the type of MCI device to open: AVIVideo, CDAudio, DAT, DigitalVideo, MMMovie, Other, Overlay, Scanner, Sequencer, VCR, Videodisc, or WaveAudio.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    Gers France
    Posts
    8
    This is the good control, but I don't want it to open a window, I want to play it into an invisible picturebox because I have to draw some rectangles on it and also to know the original image...

    How can I do that?

  4. #4
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    I dont know how to do it in a MControl but u can use this API:

    Private Declare Function mciSendString Lib "winmm.dll" Alias _
    "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
    lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
    hwndCallback As Long) As Long







    Private Sub Command1_Click()


    Last$ = Picture1.hWnd & " Style " & &H40000000
    ToDo$ = "open Your AVI file goes here Type avivideo Alias video parent " & Last$
    x% = mciSendString(ToDo$, 0&, 0, 0)
    x% = mciSendString("put video window at 0 0 210 210", 0&, 0, 0)
    x% = mciSendString("play video wait", 0&, 0, 0)
    x% = mciSendString("close video", 0&, 0, 0)
    End Sub


    Private Sub Form_Unload(Cancel As Integer)
    x% = mciSendString("close video", 0&, 0, 0)
    End Sub

  5. #5
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    Gers France
    Posts
    8
    I wrote that thread, but there's no reply!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width