|
-
Mar 2nd, 2001, 12:56 AM
#1
Thread Starter
New Member
I'm trying to, on form load, have an avi play automatically. How do I do this????
-
Mar 2nd, 2001, 04:44 AM
#2
New Member
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
-
Mar 2nd, 2001, 12:39 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|