如何用API及MMSYSTEM.DLL播放AVI文件
2006-02-27 11:54:12 来源:WEB开发网核心提示:'Author:GordonF.MacLeod'Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL..'---'Here'showtoplayan.AVIfileviaAPI'DeclarethisAPI:DeclareFuncti
'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"->
'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"->
更多精彩
赞助商链接