Question

Locked

Run an avi file from VB6

By esupport ·
How do I run an avi file from withing VB6. Using execute and wait I can run an exe file.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

s long as the file association

by Tony Hopkinson In reply to Run an avi file from VB6

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

Collapse -

Yes tried that thanks

by esupport In reply to s long as the file associ ...

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

Collapse -

Are you using ShellExecute, worked for me

by Tony Hopkinson In reply to Yes tried that thanks
Collapse -

Worked a treat, thanks for all your help

by esupport In reply to Run an avi file from VB6

Worked a treat, thanks for all your help

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums