Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I play music in VB5

Status
Not open for further replies.

jeljames

Technical User
Apr 20, 2001
1
US
Okay here is my problem if anyone can help I would be very thankful. I am an 18 year old kid just getting into programming. well I learned of a place to download a program to play music in my VB6 I have at home. Well at my school we are using VB5 and I can't find away to convert the file so I can use it at school. My teacher told me if I could play music in VB5 she would give me an "A" or if I could learn how to write music in VB5 and have the VB5 play it.
 
Probably a little advanced... but look into DirectSound in the DirectX SDK. It's free to download from Microsoft but DirectX is complex. If you are looking to develop games... DirectX is the tool for you. Rob Marriott
rob@career-connections.net
 
well I'm not trying to get to games yet I am just trying to get background music to play in VB5 I am just a beginner and I am really trying hard to learn programming cuz that is what I want to do for a career I am learning Cisco routers level 1 this summer and I will continue that for 4 semester til I am certified but for now I am learning VB and I am trying to do the best I can and I want to learn more of this and do better then the rest of my class and I am but I still want to learn more so can you help me?

Signed James
 
Try the PlaySound call in the Win32 api. It's listed in the api text viewer (Start | Programs | Microsoft Visual Studio 6.0 | Microsoft Visual Studio 6.0 Tools | API Text Viewer

It's nice because it allows you to start playing a sound and then go and do something else while it plays in the background. If there's a sound that needs to be played which is more important, call PlaySound again and it will replace the current sound being played.

Only downside is that it doesn't notify you when the .wav file finishes playing -- you'll need the DirectSound stuff for that.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top