|
-
Sep 21st, 2006, 07:05 AM
#1
Thread Starter
Addicted Member
[RESOLVED] VB6 Embed audio
Hi all,
I've got a program that needs a sound file to play when a button is clicked. However, I want to embed it (the music file) into the program so that:
A) I can distribute the program to other people and so that they don't need the music file to go alongside it, and
B) So there isn't a delay when the program tries to load the sound file locally or from across the internet.
I've tried using the Media Player control, and although I can get it to work, I can only seem to link to a sound file using the "url" command; If I remove or rename the sound file, it stops working. I did a search of VBforums and founf the Microsoft media controls, but I can't get it to play the song at all: I tried defining the audio file both in the MMC's properties (FileName), defining FileName in the program (in Form_load), and also using the
Code:
MMC1.Command = "C:\Filename.wav"
format. I have also tried enabling the splay, and other buttons, and they appear enabled in the regular view of VB6, but when I click run to test the program, the play button is greyed out.
Any ideas / syntax advice?
Thanks!
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
|
Click Here to Expand Forum to Full Width
|