by Nichols Software (5 Submissions)
Category: Sound/MP3
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 20th June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Plays an AVI on a form without using any ocx control.
Dim Ret As Long, A$, x As Integer, y As Integer
x = 0
y = 0
A$ = "C:\Windows\Movie.avi" 'Change the path and filename
Ret = mciSendString("stop movie", 0&, 128, 0)
Ret = mciSendString("close movie", 0&, 128, 0)
Ret = mciSendString("open AVIvideo!" & A$ & " alias movie parent " & Form1.hWnd & " style child", 0&, 128, 0)
Ret = mciSendString("put movie window client at " & x & " " & y & " 0 0", 0&, 128, 0)
Ret = mciSendString("play movie", 0&, 128, 0)
End Sub
Private Sub Form_Terminate()
Dim Ret As Long
Ret = mciSendString("close all", 0&, 128, 0)
End Sub