用到的控件:commondialog,timer,windows media player
原文链接:https://www.f2er.com/vb/258854.htmlprivate sub form_load()
if mydialog1.filename=" " then
mystart: mydialog1.showopen '弹出对话框,选择要加载的视频
if mydialog.FileName = "" Then
GoTo mystart
end If
myplayer.URL = mydialog.filename '
end If
form1.visible = false
timer1.Interval = 500
timer1.enabled = true
end sub
private sub timer_timer()
If myplayer.playstate = 1 then '每500ms判断一次音频文件是否播放完毕, myplayer.controls.play end If end sub