Load sound from created folder
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
I created a folder with name audio and i put 1 sound in it (i don't want to put the sound in resources
)
in the mouse enter event i want to put a code to play my sound
with images work :


in the mouse enter event i want to put a code to play my sound
with images work :
Code: Select all
But how cam i make with sound? me.backgroundimage=image.fromfile("..\..\audio\sound.wav")
You can use the Windows Media Player COM control:
Code: Select all
Dim wmp As WMPLib.WindowsMediaPlayer = New WMPLib.WindowsMediaPlayer()
Private Sub PictureBox1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If wmp.playState <> WMPLib.WMPPlayState.wmppsPlaying Then
wmp.URL = "..\..\audio\sound.wav"
End If
End Sub
I don't what in this way
It's possible in other way? without WMP?
It's possible in other way? without WMP?
Easy to play sound from folder : ( No Loop )
if i help you Give "Thanks" for me plus +Rep
Thanks
-CleverBoy
Code: Select all
to play sound for ever ( Loop ) :
My.Computer.Audio.Play("c:\music folder\mouse.wav", AudioPlayMode.WaitToComplete)
Code: Select all
Note : Change the music location between " and ",, the location that i put only example and it wont work My.Computer.Audio.Play("c:\music folder\mouse.wav", AudioPlayMode.BackgroundLoop)
if i help you Give "Thanks" for me plus +Rep
Thanks
-CleverBoy
Code'N'Stuff
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
That's the code i'm looking for.....THX CleverBoy wahooo; wahooo; wahooo; wahooo;
It works perfectly
It works perfectly
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023