VB - mciSendString - audio/video playback / video splashscreen etc from resource file
Normally you would use the PlaySound API to play and loop jingles in your application, say, as a splash screen showed, and do it from memory. Unfortunately, PlaySound does not play midi files, which is a shame because they are 10 to 100 times smaller than wave files.
mciSendString on the other hand does play midi files, but does not have a working command to loop playback, or playback from memory. But it can play a variety of audio and video files.
This code lets you play looping audio or video files on a form without controls, from temporary files. Just the main form and a resource file containing your audio/video is needed.
You can now force people to watch a video while your app loads, play an irritating tune while your app (game?) runs etc. The code is fully documented.
EDIT:- Up to Version 5.
Last edited by schoolbusdriver; Jun 30th, 2007 at 10:29 AM.
Reason: Version 5-1. Mod to ensure correct exit