I keep getting null reference error
Every time i run this and click the button i get a null reference error
Code:
Imports System****
Imports WMPLib
Imports AxWMPLib
Public Class Form1
Dim WithEvents myplayer As AxWMPLib.AxWindowsMediaPlayer
Private Sub PlayFile(ByVal url As String)
myplayer = New AxWMPLib.AxWindowsMediaPlayer
myplayer.URL = ("C:\Users\JeanneSky\Documents\lalala.wma")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
myplayer.Ctlcontrols.play()
End Sub
End Class