Results 1 to 4 of 4

Thread: [RESOLVED] Play Wav from Resources

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    524

    Resolved [RESOLVED] Play Wav from Resources

    Hello, how i can play an wav song from my Resources

    In my Resources folder is:
    Resources>songs>female>welcomef.wav
    For example this wav to play
    how to make it to play when form loads?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [RESOLVED] Play Wav from Resources

    This thread is marked resolve with no posted resolution.

    Is it resolved?

    If you did figure out a solution to your issue, please post it. It could help others with the same, or similiar, problem.

    Thanks.

  3. #3
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: [RESOLVED] Play Wav from Resources

    If you just need something simple:
    Code:
    Public Class Form1
    
        Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
            MyBase.OnLoad(e)
    
            My.Computer.Audio.Play(My.Resources.MyAudioFile,
                                   AudioPlayMode.Background)
        End Sub
    
    End Class

  4. #4
    Hyperactive Member stepdragon's Avatar
    Join Date
    Aug 2011
    Location
    Cincinnati
    Posts
    288

    Re: [RESOLVED] Play Wav from Resources

    Quote Originally Posted by ForumAccount View Post
    If you just need something simple:
    Code:
    Public Class Form1
    
        Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
            MyBase.OnLoad(e)
    
            My.Computer.Audio.Play(My.Resources.MyAudioFile,
                                   AudioPlayMode.Background)
        End Sub
    
    End Class
    Doesn't that only play ?PCA? WAV files?

    If you're wrong, you'll learn. If I'm wrong, I'll learn. Try something new and go from there. That's how we improve.

    CodeBank: VB.Net - Simple Proper Image Scaling in Correct Aspect Ratio - Star Rating Control
    Useful Links: HOW TO USE CODE TAGS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width