当前位置:首页>>网络编程>>VB教程>>正文

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

文章出处:网络转载 作者:未知 发布时间:2006-07-28 收藏到QQ书签
'Author:GordonF.MacLeod
'Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL..
'-------------------------------------------------------------------
'Here'showtoplayan.AVIfileviaAPI
'DeclarethisAPI:

DeclareFunctionmciSendString&Lib"MMSYSTEM"(ByValpstrCommand$,
ByVallpstrReturnStrAsAny,ByValwReturnLen,ByValCallBack)

'Addthiscodetotheappropriateevent:

DimCmdStr$
DimReturnVal&

'Modifypathandfilenameasnecessary
CmdStr$="playG:\VFW_CINE\AK1.AVI"
ReturnVal&=mciSendString(CmdStr$,0&,0,0&)

'ToplaytheAVI'fullscreen'appendtoCmdStr$:

CmdStr$="playG:\VFW_CINE\AK1.AVIfullscreen"->


Google