Results 1 to 2 of 2

Thread: Sounds

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    14
    Is there anyway to include a wave file in an exe?
    I mean, to play a wave file, without having to
    having it as a seperate file...
    _________________
    .-{= TwoFace =}-.

  2. #2
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101

    OLE! OLE!

    Yes. There are two ways. One is to have a textbox, and set its text to the data of the WAV file. Y'know, whenever you open a WAV in Notepad you get all that gibberish crap... Just take it and dump it into a file, use it like normal with the PlaySound API or whatever, and delete it when the program ends.

    The othwer way is a little more intricate (but you're forced to use it if your WAV is bigger than 64k) and involves embedding the WAV directly on a form with an OLE control. Then you can 'reconstruct' the embedded file. The problem is I can't remember how to do that for the life of me... I'll bet it's in the VB help file somewhere.

    ~Zero the Inestimable

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