Hello - I'm pretty new to VB, and have a tiny project going outside of class
to keep my brain moving. I would like to spice up a program so that on the
form load, it will play a MP3 in the background - nothing overbearing, just
a quiet something.
Another thing I would like to do is have the buttons click, you know, make a
click noise when you press them - I have the perfect sound in .wav format
("click.wav"), and it's only 6k.
I have started looking into winmm.dll, but everything I find on the net is
for VB 6 or earlier - I'm only using VB .net.
Thanks for any help anyone can provide, as I want to show my wife that I'm
learning something fun as well as interesting.
Patrick - 28 Oct 2004 03:38 GMT
Ok - Figured out the .wav file thing, by inlcuding
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
' and to following as part of the event
sndPlaySound("c:\temp\click.wav", &H1)
' H0 means stop to play, H1 means play and continue processing
Now to figure out the MP3 portion - hmmm....
> Hello - I'm pretty new to VB, and have a tiny project going outside of class
> to keep my brain moving. I would like to spice up a program so that on the
[quoted text clipped - 10 lines]
> Thanks for any help anyone can provide, as I want to show my wife that I'm
> learning something fun as well as interesting.