none
Comando RRS feed

Respostas

  • Deste jeito (dois botoes: um para tocar e o outro para parar):

    Option Explicit On 
    Option Strict On 
     
    Imports System.Windows.Media  
     
    Public Class Form1  
        Private player As New MediaPlayer()  
     
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click  
              
            ' change the path to your wma  
            player.Open(New Uri("file://C:/Documents and Settings/All Users/Documents/My Music/Sample Music/Beethoven's Symphony No. 9 (Scherzo).wma"))  
            player.Play()  
        End Sub 
     
     
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click  
            player.Stop()  
            player.Close()  
        End Sub 
    End Class 

    fonte:http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/b61a824f-1c0f-4491-918a-fa81d235aa32/

    Att


    William John Adam Trindade
    Analyste-programmeur
    ----------------------------------------------------------

    Sogi informatique ltée



    quinta-feira, 18 de outubro de 2012 17:56
    Moderador