[How To] Add background Music menu

User Tag List

Results 1 to 11 of 11
  1. #1
    marco1234's Avatar Active Member
    Reputation
    46
    Join Date
    May 2008
    Posts
    137
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [How To] Add background Music

    I'll show you guys how to add Background music to your Visual Basics project. (2008 Edition)-



    Guide:

    1.- Start Visual Basics 2008

    2.- Hit "New Project" at the very top.

    3.- Name it like whatever you want and hit "Ok"

    4.- Now.. First of all you need to save the Project 1 time, so there is Visual Basics Project folder of your Application, just hit "Save all" at the very top.

    5.- I recommend you to save it : My documents -> Visual Studio 2008 -> Projects / But it doesn't matter that kinda much.

    6.- Now if your done with saving the project, go and hit "Project" at the top, and click at the Roll down menu.. on Project Properities. At the end.

    7.- You'll see a menu, click on "Resources".

    8.- Now hit the small Arrow near "Add Resource" now you'll see a drop down menu, hit "Add existing file"

    9.- Now you are in the Browse menu, go to the music you want to have as background music. (ONLY ".wav" Music FILES WILL WORK!) and double click on it.

    10.- It should be added to your Resources now. IF IT GIVES YOU and error, go to your Project folder and make a Folder called "Resources" and add the music in it, and try to add the music again in the Resources.

    11.- Now go back to the build menu, and add a Button.

    12.- Double click on the Button, now you're in the Code- Menu.

    13.- Now type in this:
    CHANGE THE RED THING TO YOUR File Music NAME (WITHOUT ".WAV")
    My.Computer.Audio.Play(My.Resources.song name of the song, AudioPlayMode.BackgroundLoop)
    For Example:

    My.Computer.Audio.Play(My.Resources.song pokerface, AudioPlayMode.BackgroundLoop)

    14. If you want a button which stops the song, make a second button and double click on it. And type in this code:
    My.Computer.Audio.Stop()

    15. Now your Project is done! You can debug it whatever you want.





    If you got questions, comment etc.

    Please comment if it works, would be nice to hear then.
    I'm a proffesional DB Developer, worked for top servers like WoWScape, UberWoW etc. I can work for you aswell, add me on MSN: [email protected]
    Still looking for a host, be part of a great succes and earn much money. Add me on MSN.

    [How To] Add background Music
  2. #2
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is epic... i will have alot of use for this! +Rep
    sry need to spread
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


  3. #3
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Holy jesus christ. How many times must I make the same comment over and over...

    STOP USING THE BACKWARDS COMPATIBILITY LIBRARIES!

    They are outdated, slow, and more or less buggy.

    Look into the System.Media namespace to do all of this the PROPER way.

  4. #4
    marco1234's Avatar Active Member
    Reputation
    46
    Join Date
    May 2008
    Posts
    137
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Holy jesus christ. How many times must I make the same comment over and over...

    STOP USING THE BACKWARDS COMPATIBILITY LIBRARIES!

    They are outdated, slow, and more or less buggy.

    Look into the System.Media namespace to do all of this the PROPER way.
    It works without any bugs/problems for me..
    I'm a proffesional DB Developer, worked for top servers like WoWScape, UberWoW etc. I can work for you aswell, add me on MSN: [email protected]
    Still looking for a host, be part of a great succes and earn much money. Add me on MSN.

  5. #5
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Holy jesus christ. How many times must I make the same comment over and over...

    STOP USING THE BACKWARDS COMPATIBILITY LIBRARIES!

    They are outdated, slow, and more or less buggy.

    Look into the System.Media namespace to do all of this the PROPER way.
    How is ur way?? is it faster? ^^ can u upload the code for that? :P
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ' Create the SoundPlayer object, using a stream from our Song in the resources.
    ReadOnly player As System.Media.SoundPlayer = New SoundPlayer(Properties.Resources.SongToPlay)
    
    Private Sub btnPlay_Click(ByVal sender As Object, ByVal e As EventArgs)
        player.PlayLooping()
    End Sub
    
    Private Sub btnStop_Click(ByVal sender As Object, ByVal e As EventArgs)
        player.Stop()
    End Sub
    See how simple that was?

    Also, all of the backwards compatibility libs (most off the stuff in the My.Computer, etc) have not been updated since .NET 1.1. They've received small updates to address bugs, but that's about it. (In truth, they should be removed completely, but since it will break backwards compatibility with older VB6 apps, they can't.)

  7. #7
    Jonthe838's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool ^^ thx i will have alot of use for this
    Lines of Coding: |||||||||| Goal 1000
    Current: 677 Achived Goals: 500 Lines


  8. #8
    [CimSlunt]'s Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is good but how do i do it so the music start when the app opens and stop when closes?

  9. #9
    marco1234's Avatar Active Member
    Reputation
    46
    Join Date
    May 2008
    Posts
    137
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by [CimSlunt] View Post
    This is good but how do i do it so the music start when the app opens and stop when closes?
    Yes just double click on the Form and In-put the code.
    Then.. it should work.
    I'm a proffesional DB Developer, worked for top servers like WoWScape, UberWoW etc. I can work for you aswell, add me on MSN: [email protected]
    Still looking for a host, be part of a great succes and earn much money. Add me on MSN.

  10. #10
    [CimSlunt]'s Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It does work, thank you

  11. #11
    Ebonesser's Avatar Member
    Reputation
    33
    Join Date
    Mar 2009
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This could really be useful in programs i'll make in the future...
    Thnx for sharing +rep to both

Similar Threads

  1. How To: Add Game Objects anywhere, everywhere!
    By CSOM in forum WoW EMU Guides & Tutorials
    Replies: 5
    Last Post: 09-05-2024, 04:07 AM
  2. ??how to add music to your server???
    By schreiber37 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-12-2008, 01:01 PM
  3. How to Add Premade Leveling Items [Included]
    By Herzeleid in forum WoW EMU Guides & Tutorials
    Replies: 8
    Last Post: 10-30-2007, 03:53 AM
  4. how to add sig or avatar to mmowned
    By Sacrifice in forum Art & Graphic Design
    Replies: 6
    Last Post: 07-21-2007, 04:27 PM
  5. How to add Images?
    By Fault in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 08-17-2006, 05:54 PM
All times are GMT -5. The time now is 02:23 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search