Hi there,
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:
[CODE=vbnet]Private Sub BtnBrowse_Click (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles BtnBrowse.Click
With OpenFileDialog1
.Title = "Media File Browser"
.Filter = "Media Files (*.wmv;*.mp3)|* .wmv;*.mp3"
.FileName = ""
.CheckFileExist s = True
End With
If OpenFileDialog1 .ShowDialog = _
Windows.Forms.D ialogResult.OK Then
AxWindowsMediaP layer1.URL = _
OpenFileDialog1 .Filename
End If
End Sub
End Class[/CODE]
But the OpenFileDialog1 is underlined in blue, and VBexpress says there is an error.
Any help would be helpful, thanks
Luke
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:
[CODE=vbnet]Private Sub BtnBrowse_Click (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles BtnBrowse.Click
With OpenFileDialog1
.Title = "Media File Browser"
.Filter = "Media Files (*.wmv;*.mp3)|* .wmv;*.mp3"
.FileName = ""
.CheckFileExist s = True
End With
If OpenFileDialog1 .ShowDialog = _
Windows.Forms.D ialogResult.OK Then
AxWindowsMediaP layer1.URL = _
OpenFileDialog1 .Filename
End If
End Sub
End Class[/CODE]
But the OpenFileDialog1 is underlined in blue, and VBexpress says there is an error.
Any help would be helpful, thanks
Luke
Comment