![]() ![]() Private Sub Player_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles Player.PlayStateChangeĬase WMPPlayState.wmppsPlaying 'The Player is playing. Private Sub Player_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Player.Enter Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click Private Sub btnPlayPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlayPause.Click If openFileDialog1.ShowDialog() = DialogResult.OK Then OpenFileDialog1.Filter = "Windows Media Audio (*.wma)/*.wma/Windows Media Video (*.wmv)/*.wmv" 'Present the user with a file open dialog box. Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpen.Clickĭim openFileDialog1 As New OpenFileDialog Me.btnPlayPause.Location = New (144, 280) Me.Player.OcxState = CType(resources.GetObject("Player.OcxState"), .State) ![]() Me.btnStop = New ĬType(Me.Player, ).BeginInit() Me.Player = New AxWMPLib.AxWindowsMediaPlayer 'It can be modified using the Windows Form Designer.įriend WithEvents Player As AxWMPLib.AxWindowsMediaPlayerįriend WithEvents lblTitle As įriend WithEvents btnOpen As įriend WithEvents btnPlayPause As įriend WithEvents btnStop As ĭim resources As = New (GetType(Form1)) 'NOTE: The following procedure is required by the Windows Form Designer Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) ![]() 'Form overrides dispose to clean up the component list. 'Add any initialization after the InitializeComponent() call 'This call is required by the Windows Form Designer. #Region " Windows Form Designer generated code " **Remember I am a beginning programmer** Thanks a bunch!! Import statements must precede any declarations "I tried Microsoft's tutorial for playing digital media in Visual Basic Net, and I keep getting the following errors: ![]()
0 Comments
Leave a Reply. |