Results 1 to 3 of 3

Thread: movies

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    10

    Question

    I'm trying to, on form load, have an avi play automatically. How do I do this????

  2. #2
    New Member HCK's Avatar
    Join Date
    Feb 2001
    Location
    Germany
    Posts
    5

    AVI on Form_Load

    Option Explicit
    Dim last$, todo$, x%

    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 Form_Load()

    last$ = Form1.hWnd & " Style " & &H40000000

    todo$ = "open c:\myvideo.avi 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

  3. #3
    Guest
    Or you could make it really simple, and add a Windows
    Media Player control, and a Common Dialog, and there
    ya go.

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