Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

playing midi music in background of program

Status
Not open for further replies.

SykoStokkrTim

Programmer
Jul 19, 2002
20
US
I'm working on a game in VB and wondered how to play midi music in the background, without interrupting the rest of the game. I'd prefer not to have to use media player controls, but whatever I have to do, tell me.
 
You could use the Microsoft Multimedia Control.

MMControl1.Command = "Open"
MMControl1.Command = "Play"

You may want to add a timer also so that if the song is 60 seconds long that it'll stop and repeat after the 60 seconds.

MMControl1.Command = "Close"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
 
this is probably a stupid question, but where do I find a multimedia control?
 
Project|Components|Controls|Microsoft Media Control 6

It's in MCI32.OCX (which should be in your System32 folder)
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Sorry that should read:

Project|Components|Controls|Microsoft Multimedia Control 6
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top