利用API播放AVI
get新技能是需要付出行动的,即使看得再多也还是要动手试一试。今天图老师小编跟大家分享的是利用API播放AVI,一起来学习了解下吧!
DeclareFunctionmciSendStringLib"winmm.dll"Alias"mciSendStringA"(ByVallpstrCommandAsString,ByVallpstrReturnStringAsString,ByValuReturnLength
AsLong,ByValhwndCallbackAsLong)AsLong
代码:
DimreturnstringAsString
FileNameAsString
returnstring=Space(127)
FileName="C:A1.avi"
erg=mciSendString("open"&Chr$(34)&FileName&Chr$(34)&"typeavivideoaliasvideo",returnstring,127,0)
erg=mciSendString("setvideotimeformatms",returnstring,127,0)
erg=mciSendString("playvideofrom0",returnstring,127,0)
'记着关闭!
erg=mciSendString("closevideo",returnstring,127,0)->