Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Playing a sound using Media.Soundplayer()

Playing a sound using Media.Soundplayer()

Scheduled Pinned Locked Moved C#
tutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QzRz
    wrote on last edited by
    #1

    Hello I'm creating an application which use the Media.Soundplayer function. Currently i'm using a Media.Soundplayer funtions that Play when i press on different buttons, it works perfectly. I tried to create a new Media.SoundPlayer and load a file which should be looping while the application is running, but when i use the Media.Soundplayer it stop the previous file and start play the new one. So can anyone tell me how to play a file without it stop play unless i tell it to stop? This is how i load the files: private System.Media.SoundPlayer TrykPaaKnap = new SoundPlayer(Geografika.Properties.Resources.tryk); private System.Media.SoundPlayer BGMusik = new SoundPlayer(Geografika.Properties.Resources.Fjederdansen); Thanks

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups