VB 循环播放视频文件

用到的控件:commondialog,timer,windows media player

       private 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

你可能感兴趣的:(技术)