龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VB开发 >

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

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
Author:GordonF.MacLeod Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL.. ------------------------------------------------------------------- Hereshowtoplayan.AVIfileviaAPI DeclarethisAPI: DeclareFunctionmciSendStringLib"MMSYSTEM"(ByValpstrComm
'Author:GordonF.MacLeod
  'Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL..
  '-------------------------------------------------------------------
  'Here'showtoplayan.AVIfileviaAPI
  'DeclarethisAPI:
  
  DeclareFunctionmciSendString&Lib"MMSYSTEM"(ByValpstrCommand$,
  ByVallpstrReturnStrAsAny,ByValwReturnLen,ByValCallBack)
  
  'Addthiscodetotheappropriateevent:
  
  DimCmdStr$
  DimReturnVal&
  
  'Modifypathandfilenameasnecessary
  CmdStr$="playG:VFW_CINEAK1.AVI"
  ReturnVal&=mciSendString(CmdStr$,0&,0,0&)
  
  'ToplaytheAVI'fullscreen'appendtoCmdStr$:
  
  CmdStr$="playG:VFW_CINEAK1.AVIfullscreen"->

精彩图集

赞助商链接