Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleDisplay a transparent image with sound stored in the executable
Keywordsgraphics, animation, api, sound, wav, mid, MCI, mciSendString, user control
CategoriesGraphics, Multimedia
 
Thanks to Neil Crosby.

Neil writes:

I have tried for 5 years to write a VB program that, without any dll or controls, other than what is in the VB runtime library, to do the following:
  1. Play a transparent animated image.
  2. Include a wav and/or mid file in the exe.

Neil used a transparent image user control to solve the problem of making a transparent animated image.

Putting a .wav and a .mid file in a .res file solved including voice and music in the .exe file.

Modifying the sndPlaySound API to be able to send the wav file from a buffer that was filled with the wav file in the res file solved the wav sound problem.

Playing the .mid file was accomplished with the mciSendString API using a temp.mid file written from the .mid information in the .res file.

See the code for details (158K download).

 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated