Wednesday, December 7, 2011

SMART AUDIO PLAYER

Sub Combo1_Change( )
if ListIndex=0 Then
File1.Pattern=("*.wav")
ElseIf ListIndex=1 Then
File1.Pattern=("*.mid")
Else
File1.Pattern=("*.*)
End If
End Sub
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 Play_Click( )
If Combo1.ListIndex=0 Then
MMControl1.DeviceType="WaveAudio"
ElseIf Combo1.ListIndex=1 Then
MMControll.DeviceType="Sequencer"
End If
MMControl1.FileName=Text1.Text
MMControl1.Command="Open"
MMControl1.Command="Play"
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
Private Sub Drive1.Change( )
Dir1.Path=Drive1.Drive
End Sub
Private Sub Form_Load( )
Top=(Screen.Height-Height)\2
Left=(Screen.Width-Width)\2
Combo1.Text="*.wav"
Combo1.AddItem "*.wav"
Combo1.AddItem "*.mid"
Combo1.AddItem "All files"
End  Sub
 

No comments: