Ok, here is the problem...
I am playing with playing an AVI file through the MCI, and ran into a problem when it comes to the video.
The video has a background that's transparent, which keeps appearing at Magenta on my form.
Is there way to show it actually transparent?
Here is my code....
On a form, add:
3 command buttons
1 picture box
1 timer
Code:Private Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _ lpstrCommand As String, ByVal lpstrReturnString As String, _ ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Dim sAlias As String Dim rReturn As Long Private Sub Command1_Click() Dim mssg As String * 255 sTheFile = "c:\filecopy.avi" sAlias = Right$(sTheFile, 3) & Minute(Now) nReturn = mciSendString("Open " & sTheFile & " ALIAS " & sAlias & " TYPE AviVideo wait parent " & Picture1.hWnd & " Style " & &H40000000, "", 0, 0) nReturn = mciSendString("set " & sAlias & " time format ms", 0&, 0, 0) nReturn = mciSendString("status " & sAlias & " length", mssg, 255, 0) Timer1.Interval = mssg + 500 Me.Caption = mssg End Sub Private Sub Command2_Click() nReturn = mciSendString("play " & sAlias, 0&, 0, 0) Timer1.Enabled = True End Sub Private Sub Command3_Click() nReturn = mciSendString("stop " & sAlias, 0&, 0, 0) nReturn = mciSendString("close " & sAlias, 0&, 0, 0) Timer1.Enabled = False End Sub Private Sub Timer1_Timer() nReturn = mciSendString("play " & sAlias & " from 0", 0&, 0, 0) End Sub
The video is the FILECOPY.AVI from the Microsoft Visual Studio\Common\Graphics\Videos folder.
Any help would be greatly appreciated....




Reply With Quote