Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Easiest way to play an MP3 when a form loads?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 27 Oct 2004 20:57 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.