I tried this:
Sub PlayBackgroundSoundFile() My.Computer.Audio.Play("C:\Waterfall.wav", _ AudioPlayMode.Background) End Sub
...but it doesn't work, 'cause it's for VB 2005.
Then I tried this one:
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long Private Sub Command1_Click() Dim returnval As Long Dim soundfile As String soundfile = "C:\Documents and Settings\Tomáš Čimma\Plocha\Hudba a Zvuky\Test sound.mp3" returnval = PlaySound("SystemStart", 0, &H0) End Sub
...but that didn't work too, 'cause it didn't play the correct sound and when it was playing the other one, the whole Form was stuck and I went active when the sound was played.
PLEASE, HELP ME! How can I play a sound on background with path...
"C:\Documents and Settings\Tomáš Čimma\Plocha\Hudba a Zvuky\Test sound.mp3"
...and the project won't stuck while the sound is playing. PLEASE HELP!!!
Thank you and another 1,000 thanks to you.