-
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
-
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
-
By Arjuna in forum Database
Replies: 2
Last Post: 07-25-2007, 03:22 AM
-
Replies: 4
Last Post: 04-14-2006, 09:09 AM
-
By bond_ankur in forum Java
Replies: 0
Last Post: 04-07-2006, 01:30 PM
-
Replies: 1
Last Post: 11-27-2001, 06:53 AM
-
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
Forum Rules
|
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
|
Bookmarks