hey, i am in a computer science class and we are working on a final project to be counted as our final for the class...anyway....i was wondering how i can get video to play when i load the program (game)...ive heard alot about the MMC or the Windows Media Player but we were never taught about how to operate those so if you could put step by step instructions with code and easily read instructions that would be great...by the way i use Microsoft Visual Studio 6.0 Professional....thanks for any help
02-06-2005 at 08:48 PM
|
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: playing any kind of video in VB!
go to msdn.microsoft.com and search there for
Windows Media Player Visual Basic 6
or something similar, and you will find a documentation with examples of how to use WMP. Altough, "playing any kind of video" will surely not be possible, without having many codecs installed for diferent file formats.
____________________________
If you find the answer helpful, please mark this topic as solved.
02-06-2005 at 10:04 PM
|
TJ_01 Level: VB Lord Registered: 24-08-2005 Posts: 320
Re: playing any kind of video in VB!
I agree with goran. There are some video that cannot be play in WMP unless you install different codecs on it. Anyway check out this code and see if helps..
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
'// --- Modify FILE_TO_OPEN constant as appropriate ---
Const FILE_TO_OPEN = "C:\windows\help\explorer.avi"
Dim strCmdStr As String
Dim lngReturnVal As Long
strCmdStr = "play " & FILE_TO_OPEN & " fullscreen "
lngReturnVal = mciSendString(strCmdStr, 0&, 0, 0&)
quote:JaguarLacrosse17 wrote:
hey, i am in a computer science class and we are working on a final project to be counted as our final for the class...anyway....i was wondering how i can get video to play when i load the program (game)...ive heard alot about the MMC or the Windows Media Player but we were never taught about how to operate those so if you could put step by step instructions with code and easily read instructions that would be great...by the way i use Microsoft Visual Studio 6.0 Professional....thanks for any help