Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'wma.URL = "music\背景音樂.mp3" '相對路徑示範
'音樂檔案要放在 專案名稱的資料夾 bin /debug底下 才可以
wma.URL = "http://webhd.must.edu.tw/download/背景音樂.mp3?para=TLXjxW35WGp4VzM1cmovbjk3MTcwMDI4L61JtLqttbzWLm1wM3Q3VExYang=" '使用網路位址示範
'如果沒有音樂那就是網址變更了!
wma.Ctlcontrols.play()
End Sub
Private Sub wma_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles wma.PlayStateChange
If wma.playState = WMPLib.WMPPlayState.wmppsStopped Then
wma.Ctlcontrols.play()
End If
End Sub
End Class
沒有留言:
張貼留言