说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

VB如何用API及MMSYSTEM.DLL播放AVI文件

HTML文档下载 WORD文档下载 PDF文档下载
VB如何用API及MMSYSTEM.DLL播放AVI文件

'Author: Gordon F. MacLeod
'How to play an .AVI file using API and the MMSYSTEM.DLL..
'-------------------------------------------------------------------
' Here's how to play an .AVI file via API
' Declare this API:

Declare Function mciSendString& Lib "MMSYSTEM" (ByVal pstrCommand$,
ByVal lpstrReturnStr As Any, ByVal wReturnLen%, ByVal CallBack%)

'Add this code to the appropriate event:

Dim CmdStr$
Dim ReturnVal&

' Modify path and filename as necessary
CmdStr$ = "play G:\VFW_CINE\AK1.AVI"
ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)

' To play the AVI 'fullscreen' append to CmdStr$:

CmdStr$ = "play G:\VFW_CINE\AK1.AVI fullscreen"
备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn 说三道四技术文摘