|
-
Jul 30th, 2001, 05:18 AM
#1
Thread Starter
Hyperactive Member
how to play midi file
Hello everybody,
I want to play midi file when opening a file
How do i do this?
Thanks in advance,
ERAN
Eran Fox
ASSEMBLER,C,C++,VB6,SQL...
-
Jul 30th, 2001, 07:04 AM
#2
Hyperactive Member
One easy way to play a midi file is to use the Microsoft Multimedia Control.
'CLOSE file that is playing
mmControl.Command = "Close"
'ENABLE
mmControl.PlayEnabled = True
'SET file name
mmControl.FileName = "C:\Music\song.mid"
'OPEN file
mmControl.Command = "Open"
'PLAY file
mmControl.Command = "Play"
-
Jul 30th, 2001, 09:13 AM
#3
Or use the mciSendString API.
VB Code:
'Open the midi
mciSendString "open C:\MyFile.mid type sequencer alias midi", 0, 0, 0
'Play the midi
mciSendString "play midi", 0, 0, 0
'Stop the midi
mciSendString "stop midi", 0,0,0
'Close the midi
mciSendString "close midi", 0, 0, 0
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
|