AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > VB编程

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

51自学网 http://www.wanshiok.com
'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"

 

 

 
上一篇:如何从"SOUND.DRV"中提取声音  下一篇:使机箱内的小喇叭发出不同的声音