Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15083

[RESOLVED] Simple (??) Windows Media Stuff

$
0
0
So, here is my complete code (so far):

Code:

Option Explicit


Private Sub Command1_Click()
    wmp1.URL = File1.Path & "\" & File1.FileName
End Sub


Private Sub Command2_Click()
    wmp1.fullScreen = True
End Sub


Private Sub Form_Load()
    File1.Path = App.Path & "\country"
End Sub


Private Sub wmp1_PlayStateChange(ByVal NewState As Long)
    If wmp1.playState = wmppsStopped Then
        File1.ListIndex = File1.ListIndex + 1
        wmp1.URL = File1.Path & "\" & File1.FileName
    End If
End Sub

I have a WindowsMediaPlayer (named wmp1) on a form. Two command buttons (1 to start the wmp, and 1 to set the wmp to full screen---the latter I will modify later where I hope the wmp will remain in full screen mode); and a filelistbox (file1) set to a directory with about 30 .mp4 videos.

Currently (in my test phase), I click command1 to start the player (after clicking on a entry in the filelistbox).

The player plays the first file, and then stops. I was hoping by checking the playState (see above) that if I moved down my filelistbox index, the player would start playing again...it does not. It also (if I happened to have clicked the 2nd command button to set the player at fullscreen) returns to regular size (not full screen).

Thought this was going to be simple.

Any assistance?

(And, oh yeah, if I go this route I'd check to make sure no video would be attempted when reaching the end of the filelistbox).

Sam

Viewing all articles
Browse latest Browse all 15083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>