I am currently trying to learn Visual Basic, using Visual Basic Express 2005. I am making a Mulitmedia Player. I have added Windows Media Player via the COM components and dragged it onto the stage, and I have also created a browse... button with the following code:
Expand|Select|Wrap|Line Numbers
- Private Sub BtnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnBrowse.Click
- With OpenFileDialog1
- .Title = "Media File Browser"
- .Filter = "Media Files (*.wmv;*.mp3)|*.wmv;*.mp3"
- .FileName = ""
- .CheckFileExists = True
- End With
- If OpenFileDialog1.ShowDialog = _
- Windows.Forms.DialogResult.OK Then
- AxWindowsMediaPlayer1.URL = _
- OpenFileDialog1.Filename
- End If
- End Sub
- End Class
Any help would be helpful, thanks
Luke