Results 1 to 2 of 2

Thread: Embedded *.wav files [Resolved]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    127

    Question Embedded *.wav files [Resolved]

    I am currently using the code below to play *.wav files that are external to the program in a directory. I have been reading up on Embedding the file into the program so it's not placed outside in a seperate directory. Getting the file Embedded wasn't a problem but getting a refrence to it and getting it to play is another story.

    This is my code for external *.wav files that works.
    Code:
    Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
    
    
    + Windows Form Designer Generated Code
    
    Dim SelectedFile As String = "C:\cow.wav"
                PlaySound(SelectedFile, 0, 0)
    Is there an easier way to play the Embedded *.wav file ? I'm trying to get away without having a directory full of supporting files. Most of the stuff I have found on the Internet talks about creating a Class for it and then refrencing the class to play the *.wav file. Yet again it's a bit over my head on how to create a Class other than Project/Add Class -where to go from there...
    Last edited by teamdad; Jun 13th, 2004 at 08:23 PM.

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