"mciSendStrin,标题:播放 AVI" /> 播放 AVI - 关于VB的经验之谈 - VB爱好者乐园(VBGood) - 关于VB的经验,电子教程,代码,控件,论坛,博客,微博等.

VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 播放 AVI
发表评论(0)作者:, 平台:, 阅读:13746, 日期:2000-03-12
播放 AVI

声明:

Declare Function mciSendString Lib "winmm.dll" Alias _

"mciSendStringA" (ByVal lpstrCommand As String, ByVal _

lpstrReturnString As String, ByVal uReturnLength _

As Long, ByVal hwndCallback As Long) As Long

代码:

Dim returnstring As String

FileName As String

returnstring = Space(127)

FileName = "C:\A1.avi"

erg = mciSendString("open " & Chr$(34) & FileName & _

Chr$(34) & " type avivideo alias video", returnstring, _

127, 0)

erg = mciSendString("set video time format ms", _

returnstring, 127, 0)

erg = mciSendString("play video from 0", returnstring, _

127, 0)

'记着关闭!

erg = mciSendString("close video", returnstring, 127, 0)