DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    82

    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.

    Cheers,
    Justin

  2. #2
    Join Date
    Jun 2006
    Posts
    39
    USE THIS
    -------------------------------------------
    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-------------------------
    'FOR EXAMPLE
    WindowsMediaPlayer1.URL = myWav 'play it
    WindowsMediaPlayer1.Controls.play
    '--------------------------------------------------

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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links