View Full Version : Visual sutdio-How do you play mp'3s?
silverneo188
January 12th, 2008, 06:34 AM
well... how do you?
this is my code so far
Private Sub battle_Load
End Sub
what would i put to refer to a mp3 stored in my resources? the file in my resources is called battle.mp3
Voetsjoeba
January 12th, 2008, 07:38 AM
Use Google: http://www.vb-helper.com/howto_play_mp3.html
kirupa
January 12th, 2008, 03:54 PM
It also depends on whether you are creating a WPF app or a WinForms app. There are several built-in classes that automate the process of you playing sounds, so let me know what language and platform you are writing on.
alexgeek
January 13th, 2008, 08:34 AM
I found it very easy.
System.Media.SoundPlayer sound = new System.Media.SoundPlayer(@"c:\path\to\music.wav");
sound.Play();
//or
sounds.PlayLoop();
silverneo188
January 16th, 2008, 02:11 PM
I found it very easy.
System.Media.SoundPlayer sound = new System.Media.SoundPlayer(@"c:\path\to\music.wav");
sound.Play();
//or
sounds.PlayLoop();
Thanks :beer:
alexgeek
January 17th, 2008, 03:14 PM
That's C# but I think that particular code will work with any .NET language.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.