Private Sub Button1_Click( ByVal sender As System. Object , _ |
ByVal e As System.EventArgs) _ |
Handles Button1.Click |
Const DATA_FILE_EXTENSION As String = ".mp3" |
Dim dlgFileDialog As New OpenFileDialog |
With dlgFileDialog |
.Filter = DATA_FILE_EXTENSION & _ |
" files (*" & DATA_FILE_EXTENSION & "|*" & DATA_FILE_EXTENSION |
.FilterIndex = 1 |
.RestoreDirectory = True |
If .ShowDialog() = DialogResult.OK Then |
'Play the sound file |
Me .AxWindowsMediaPlayer1.URL = dlgFileDialog.FileName |
End If |
End With |
End Sub |
by: 发表于:2017-11-27 11:31:20 顶(0) | 踩(0) 回复
??
回复评论