vbCoders Guest



Don't have an account yet? Register
 


Forgot Password?



Searches for and plays midi and sequencer files in your computer

by Aghomishe Aghogho (1 Submission)
Category: Sound/MP3
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 27th October 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Searches for and plays midi and sequencer files in your computer

Rate Searches for and plays midi and sequencer files in your computer



Unload Me
End Sub

Private Sub cmdPlay_Click()
If Combo1.ListIndex = 0 Then
 MMControl1.DeviceType = "WaveAudio"
ElseIf Combo1.ListIndex = 1 Then
 MMControl1.DeviceType = "Sequencer"
End If
MMControl1.FileName = Text1.Text
MMControl1.Command = "Open"
MMControl1.Command = "Play"
Label1.Caption = "Playing " & Text1.Text & "......."
End Sub

Private Sub cmdStop_Click()
If MMControl1.Mode = 524 Then Exit Sub
If MMControl1.Mode <> 524 Then
 MMControl1.Wait = True
 MMControl1.Command = "Close"
End If
End Sub

Private Sub Combo1_Change()
If ListIndex = 0 Then
 File1.Pattern = ("*.wav")
ElseIf ListIndex = 1 Then
 File1.Pattern = ("*.mid")
Else
 File1.Pattern = ("*.*")
End If
End Sub

Private Sub Dir1_Change()
File1.Path = Dir1.Path
If Combo1.ListIndex = 0 Then
 File1.Pattern = ("*wav")
ElseIf Combo1.ListIndex = 1 Then
 File1.Pattern = ("*.mid")
Else
 File1.Pattern = ("*.*")
End If
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub


Private Sub File1_Click()
Dim flenam As String
If Right(File1.Path, 1) <> "\" Then
 filenam = File1.Path & "\" & File1.FileName
Else
 filenam = File1.Path & File1.FileName
End If
Text1.Text = filenam
End Sub

Private Sub Form_Load()
Combo1.Text = "*.wav"
Combo1.AddItem "*.wav"
Combo1.AddItem "*.mid"
Combo1.AddItem "All Files"

End Sub


Download Snippet Download this snippet   Add to My Save List Add to My Saved Code

Searches for and plays midi and sequencer files in your computer Comments

No comments have been posted about Searches for and plays midi and sequencer files in your computer. Why not be the first to post a comment about Searches for and plays midi and sequencer files in your computer.

Post your comment

Subject:
Message:
0/1000 characters