| View previous topic :: View next topic |
| Author |
Message |
SwedenS Cheater
Reputation: 0
Joined: 12 Dec 2007 Posts: 44
|
Posted: Thu Feb 07, 2008 3:52 am Post subject: How to add MUSIC ? |
|
|
Hi, iam gonna make a program in Visual Basic 2008, but i want some music, so, how to add music to my forms ?
PLEASE HELP FAST.
EDIT: It shouldnt be a "player" it should be a script that plays a song that i decided so only me can change the song, ITS NOT A MUSIC PLAYER.
Last edited by SwedenS on Thu Feb 07, 2008 6:11 am; edited 2 times in total |
|
| Back to top |
|
 |
Losplagos Expert Cheater
Reputation: 0
Joined: 21 Mar 2006 Posts: 172 Location: Knee deep in a c++ book
|
|
| Back to top |
|
 |
SwedenS Cheater
Reputation: 0
Joined: 12 Dec 2007 Posts: 44
|
Posted: Thu Feb 07, 2008 4:59 am Post subject: |
|
|
Thanks,.. iam looking at it now.'
EDIT: Iam using VB 2008 not VB6. |
|
| Back to top |
|
 |
Losplagos Expert Cheater
Reputation: 0
Joined: 21 Mar 2006 Posts: 172 Location: Knee deep in a c++ book
|
Posted: Thu Feb 07, 2008 5:09 am Post subject: Re: How to add MUSIC ? |
|
|
| SwedenS wrote: | Hi, iam gonna make a program in Visual Basic 6, but i want some music, so, how to add music to my forms ?
PLEASE HELP FAST. |
-_- Original post says
The easiest option is media player. I read somewhere you could use the api or directx but i dont know much about that. _________________
Earthbound = 31337 |
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Thu Feb 07, 2008 5:53 am Post subject: |
|
|
You can use the PlaySound function.
*For example search in google. |
|
| Back to top |
|
 |
SwedenS Cheater
Reputation: 0
Joined: 12 Dec 2007 Posts: 44
|
Posted: Thu Feb 07, 2008 6:13 am Post subject: |
|
|
| HolyBlah wrote: | You can use the PlaySound function.
*For example search in google. |
Ok, looking at that now. |
|
| Back to top |
|
 |
Losplagos Expert Cheater
Reputation: 0
Joined: 21 Mar 2006 Posts: 172 Location: Knee deep in a c++ book
|
Posted: Thu Feb 07, 2008 6:29 am Post subject: |
|
|
You would have to convert mp3 files to wav to play them with playsound. _________________
Earthbound = 31337 |
|
| Back to top |
|
 |
XxOsirisxX Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Oct 2006 Posts: 1597
|
Posted: Sun Feb 10, 2008 12:07 pm Post subject: |
|
|
Use Windows Media Player.
Right-Click on the Toolbar and press "Choose Item" or "Add/Remove Item".
Now, select the COM tab, and find "Windows Media Player".
Now add WindowsMediaPlayer to you form.
the default name of WindowsMediaPlayer control at VB.Net, is AxWindowsMediaPlayer1.
Now, at code.. lets make it simple to just give you some ideas of the use of this.
| Code: | AxWindowsMediaPlayer1.URL = ("[Location][FileName].[Extention]")
AxWindowsMediaPlayer1.settings.volume = (100)
AxWindowsMediaPlayer1.Ctlcontrols.play() |
put that at Form1_Load, and of course, change the Location for the path of the sound, and the FileName, for the Filename of the sound and also the Extention for his extention of course. _________________
|
|
| Back to top |
|
 |
|