home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmWaves
- Caption = "Wave Tester"
- ClientHeight = 1920
- ClientLeft = 1290
- ClientTop = 1515
- ClientWidth = 4575
- Height = 2325
- Icon = "WAVES.frx":0000
- Left = 1230
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 1920
- ScaleWidth = 4575
- Top = 1170
- Width = 4695
- Begin VB.Frame fraType
- Caption = "Wave &Type"
- Height = 1215
- Left = 2400
- TabIndex = 3
- Top = 120
- Width = 2055
- Begin VB.OptionButton optType
- Caption = "&Resources"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 5
- Top = 795
- Value = -1 'True
- Width = 1815
- End
- Begin VB.OptionButton optType
- Caption = "&Files..."
- Height = 255
- Index = 0
- Left = 105
- TabIndex = 4
- Top = 420
- Width = 1815
- End
- End
- Begin VB.CommandButton cmdPlayWave
- Caption = "Play"
- Default = -1 'True
- Height = 375
- Left = 2400
- TabIndex = 2
- Top = 1470
- Width = 2055
- End
- Begin VB.ListBox lstWaves
- Height = 1425
- Left = 120
- Sorted = -1 'True
- TabIndex = 1
- Top = 360
- Width = 2055
- End
- Begin MSComDlg.CommonDialog dlg
- Left = 1680
- Top = 735
- _version = 65536
- _extentx = 847
- _extenty = 847
- _stockprops = 0
- cancelerror = -1 'True
- defaultext = "wav"
- dialogtitle = "Select a Wave File Directory:"
- filter = "Wave Files (*.wav)|*.wav"
- filterindex = 1
- End
- Begin VB.Label lblWaves
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "&Wave Files.."
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 2055
- End
- Attribute VB_Name = "frmWaves"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private intOption As Integer
- Private Sub cmdPlayWave_Click()
- cmdPlayWave.Enabled = False
- Screen.MousePointer = vbHourglass
- Select Case intOption
- Case 0
- PlayWaveFile lstWaves
- Case 1
- PlayWaveRes lstWaves
- End Select
- cmdPlayWave.Enabled = True
- Screen.MousePointer = vbDefault
- End Sub
- Private Sub Form_Load()
- LoadList 1
- intOption = 1
- End Sub
- Private Sub LoadList(intOption As Integer)
- Dim strFiles As String
- With lstWaves
- .Clear
- If Visible Then .SetFocus
- Select Case intOption
- Case 0
- On Error Resume Next
- With dlg
- .Flags = cdlOFNPathMustExist Or cdlOFNHideReadOnly
- .ShowOpen
- If Err = cdlCancel Then Exit Sub
- strFiles = Left(.filename, InStr(.filename, .FileTitle) - 1)
- ChDrive strFiles
- ChDir strFiles
- End With
- strFiles = Dir("*.wav")
- Do While Len(strFiles)
- .AddItem LCase(strFiles)
- strFiles = Dir
- Loop
- Case 1
- .AddItem "Hasta"
- .AddItem "Ding"
- .AddItem "Chimes"
- .AddItem "Game"
- .AddItem "ItsBeen"
- .AddItem "RingIn"
- End Select
- If .ListCount Then .ListIndex = 0
- End With
- End Sub
- Private Sub lstWaves_LostFocus()
- cmdPlayWave.Enabled = (lstWaves.ListCount > 0)
- End Sub
- Private Sub optType_Click(Index As Integer)
- LoadList Index
- intOption = Index
- End Sub
-