How to read from resource file and create a temp folder

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to read from resource file and create a temp folder

  1. #1
    Join Date
    Jan 2006

    How to read from resource file and create a temp folder

    Hi guys,

    I am trying to embed an mp3 file into my application. But then an mp3 file is too large to be read from an reaource file.

    So now, may i know how do i complete all these task at runtime:

    1)extract a mp3 file from the resource file,
    2)create a temp folder
    3)put the extracted mp3 file into this temp folder,
    4)call up media player to play this mp3 file

    Thanks alot guys.


  2. #2
    Join Date
    Jun 2006
    Dim snd() As Byte
    Dim myWav As String
    myWav = App.Path & "\temp" & FreeFile() & ".MP3" 'make a sequential file name
    snd = LoadResData(101, "CUSTOM") 'load the raw bytes into an array

    Open myWav For Binary As 1 'open, put, and close the .wav file
    Put #1, , snd
    Close #1
    'PLAYING CODE from temp-------------------------
    WindowsMediaPlayer1.URL = myWav 'play it

Similar Threads

  1. Database not properly created
    By Arjuna in forum Database
    Replies: 2
    Last Post: 07-25-2007, 03:22 AM
  2. Getting a GUI to run
    By Eric in forum Java
    Replies: 4
    Last Post: 04-14-2006, 09:09 AM
  3. Replies: 0
    Last Post: 04-07-2006, 01:30 PM
  4. Getting a GUI to function
    By Eric in forum Java
    Replies: 1
    Last Post: 11-27-2001, 06:53 AM
  5. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center