Question Locked

Run an avi file from VB6

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I run an avi file from withing VB6. Using execute and wait I can run an exe file.

5 replies

by tony hopkinson

is set up, exactly the same way.
Just 'execute' the avi file and windows will do the rest.

by esupport

I Have a tiny prog just to test with path to an exe file and an avi file. I use shell and wait. The code is exactly the same but the avi gives error Invalid Procedure call or argument. Code as follows: Works for the exe file not the avi file.
Private Sub ShellAndWait()
Dim ProcessId As Long
Dim ProcessHandle As Long
Const Access As Long = &H100000
ProcessId = Shell(gstrProgram, vbNormalFocus)
Do
ProcessHandle = OpenProcess(Access, False, ProcessId)
If ProcessHandle <> 0 Then
CloseHandle ProcessHandle
End If
DoEvents
Loop Until ProcessHandle = 0
End Sub

This discussion is closed to new replies.