Description
this tutorial i will show how to add windows media player into the form (vb.net), and get the source of media , and how to repeat forever the player.
HowTo
1. Open your project VB.NET , click on the toolbox icon on the left, after the toolbox appeared right click on the area of toolbox and click choose item.
2. Select COM Component and choose "Windows Media Player"
4. to add path just add this code in the form load :
myplayer.URL= "D:\zzz.wmv"
if you have dynamic path maybe you can use this :
myplayer.URL = My.Application.Info.DirectoryPath & "zzz.wmv"
another control :
myplayer.ctlcontrols.play()
myplayer.ctlcontrols.stop()
5. Now Run it, the video will be playing :), but some case we need playing repeatly forever. to looping forever use this syntax on form load or whatever :
myplayer.settings.setMode("loop", True)
Post a Comment
Harap gunakan bahasa yang baik dan sopan, terima kasih