home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4609
/
wavplus
/
wavplay.frm
< prev
next >
Wrap
Text File
|
1994-06-28
|
8KB
|
275 lines
VERSION 2.00
Begin Form WavPlay
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "WAV Player"
ClientHeight = 4185
ClientLeft = 1095
ClientTop = 1485
ClientWidth = 5535
ControlBox = 0 'False
Height = 4590
Left = 1035
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4185
ScaleWidth = 5535
Top = 1140
Width = 5655
Begin CommandButton CmdWait
BackColor = &H00C0C0C0&
Caption = "Play WAV &Wait"
Height = 375
Left = 3360
TabIndex = 2
Top = 1440
Width = 1815
End
Begin CommandButton CmdStop
BackColor = &H00C0C0C0&
Caption = "&Stop WAV"
Height = 375
Left = 3360
TabIndex = 5
Top = 2520
Width = 1815
End
Begin CommandButton CmdInfo
BackColor = &H00C0C0C0&
Caption = "WAV &Info"
Height = 375
Left = 3360
TabIndex = 6
Top = 3120
Width = 1815
End
Begin CommandButton CmdLoop
BackColor = &H00C0C0C0&
Caption = "&Loop Play WAV"
Height = 375
Left = 3360
TabIndex = 4
Top = 2160
Width = 1815
End
Begin CommandButton CmdMCI
BackColor = &H00C0C0C0&
Caption = "&MCI Play\Record"
Height = 375
Left = 3360
TabIndex = 3
Top = 1800
Width = 1815
End
Begin CommandButton CmdNormal
BackColor = &H00C0C0C0&
Caption = "Normal &Play WAV"
Height = 375
Left = 3360
TabIndex = 1
Top = 1080
Width = 1815
End
Begin FileListBox File1
Height = 1980
Left = 360
Pattern = "*.WAV"
TabIndex = 9
Top = 1920
Width = 2655
End
Begin DirListBox Dir1
Height = 1155
Left = 360
TabIndex = 8
Top = 600
Width = 2655
End
Begin DriveListBox Drive1
Height = 315
Left = 360
TabIndex = 7
Top = 240
Width = 2655
End
Begin CommandButton CmdOkay
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "O &K A Y"
Height = 375
Left = 3360
TabIndex = 0
Top = 3480
Width = 1815
End
Begin Image Image1
Height = 480
Left = 4080
Picture = WAVPLAY.FRX:0000
Top = 240
Width = 480
End
End
Sub CmdInfo_Click ()
i% = File1.ListIndex
If i% = -1 Then
MsgBox "No WAV file selected!", 16, "User Error"
Exit Sub
End If
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
FullPath$ = Dir1.Path
FullPath$ = AddSeparator(FullPath$) + File1.List(File1.ListIndex)
FormPassString = FullPath$
Screen.MousePointer = 11
WavInfo.Show 1
End Sub
Sub CmdLoop_Click ()
i% = File1.ListIndex
If i% = -1 Then
MsgBox "No WAV file selected!", 16, "User Error"
Exit Sub
End If
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
FullPath$ = Dir1.Path
FullPath$ = AddSeparator(FullPath$) + File1.List(File1.ListIndex)
dummy% = PlayWavLoop(FullPath$)
If dummy% = 0 Then
MsgBox "Incompatible file format!", 16, "File Error"
End If
End Sub
Sub CmdMCI_Click ()
i% = File1.ListIndex
If i% = -1 Then
MsgBox "No WAV file selected!", 16, "User Error"
Exit Sub
End If
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
FullPath$ = Dir1.Path
FullPath$ = AddSeparator(FullPath$) + File1.List(File1.ListIndex)
FormPassString = FullPath$
Screen.MousePointer = 11
MCIwav.Show 1
End Sub
Sub CmdNormal_Click ()
i% = File1.ListIndex
If i% = -1 Then
MsgBox "No WAV file selected!", 16, "User Error"
Exit Sub
End If
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
FullPath$ = Dir1.Path
FullPath$ = AddSeparator(FullPath$) + File1.List(File1.ListIndex)
dummy% = PlayWavNoWait(FullPath$)
If dummy% = 0 Then
MsgBox "Incompatible file format!", 16, "File Error"
End If
End Sub
Sub CmdOkay_Click ()
Unload Me
End Sub
Sub CmdStop_Click ()
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
dummy% = StopWavLoop()
End Sub
Sub CmdWait_Click ()
i% = File1.ListIndex
If i% = -1 Then
MsgBox "No WAV file selected!", 16, "User Error"
Exit Sub
End If
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
FullPath$ = Dir1.Path
FullPath$ = AddSeparator(FullPath$) + File1.List(File1.ListIndex)
Screen.MousePointer = 11
dummy% = PlayWavWait(FullPath$)
Screen.MousePointer = 0
If dummy% = 0 Then
MsgBox "Incompatible file format!", 16, "File Error"
End If
End Sub
Sub Dir1_Change ()
Screen.MousePointer = 11
ChDir Dir1.Path
File1.Path = Dir1.Path
Screen.MousePointer = 0
End Sub
Sub Drive1_Change ()
On Error GoTo SelDrvBad
Screen.MousePointer = 11
ChDrive Drive1.Drive
Dir1.Path = Drive1.Drive
Screen.MousePointer = 0
Exit Sub
SelDrvBad:
Screen.MousePointer = 0
msg$ = "Drive Error " + UCase$(Left$(Drive1.Drive, 1)) + ":"
response = MsgBox("Can NOT Access Drive!", 21, msg$)
If response = 4 Then
Screen.MousePointer = 11
Resume 0
End If
WinRoot
Exit Sub
End Sub
Sub File1_DblClick ()
If HowManyWavPlayDevices() = 0 Then
MsgBox "No sound card recognized!", 16, "Missing Device"
Exit Sub
End If
FullPath$ = Dir1.Path
FullPath$ = AddSeparator(FullPath$) + File1.List(File1.ListIndex)
dummy% = PlayWavNoWait(FullPath$)
If dummy% = 0 Then
MsgBox "Incompatible file format!", 16, "File Error"
End If
End Sub
Sub Form_Load ()
FormCenterScreen Me
Screen.MousePointer = 0
End Sub
Sub Form_Paint ()
DoForm3D Me, sunken, 3, 0
DoForm3D Me, raised, 1, 3
End Sub
Sub WinRoot ()
Screen.MousePointer = 11
WinDir$ = Left$(GetWinDir(), 3)
Drive1.Drive = WinDir$
ChDrive WinDir$
Dir1.Path = CurDir$
Screen.MousePointer = 0
End Sub