home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form PlayDays
- Caption = "Play Days"
- ClientHeight = 4500
- ClientLeft = 1140
- ClientTop = 1470
- ClientWidth = 4140
- LinkTopic = "PlayWave"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 4500
- ScaleWidth = 4140
- Begin VB.CommandButton Play
- Caption = "Sunday"
- Height = 495
- Index = 6
- Left = 720
- TabIndex = 6
- Top = 3720
- Width = 2535
- End
- Begin VB.CommandButton Play
- Caption = "Saturday"
- Height = 495
- Index = 5
- Left = 720
- TabIndex = 5
- Top = 3120
- Width = 2535
- End
- Begin VB.CommandButton Play
- Caption = "Friday"
- Height = 495
- Index = 4
- Left = 720
- TabIndex = 4
- Top = 2520
- Width = 2535
- End
- Begin VB.CommandButton Play
- Caption = "Thursday"
- Height = 495
- Index = 3
- Left = 720
- TabIndex = 3
- Top = 1920
- Width = 2535
- End
- Begin VB.CommandButton Play
- Caption = "Monday"
- Height = 495
- Index = 0
- Left = 720
- TabIndex = 2
- Top = 120
- Width = 2535
- End
- Begin VB.CommandButton Play
- Caption = "Wednesday"
- Height = 495
- Index = 2
- Left = 720
- TabIndex = 1
- Top = 1320
- Width = 2535
- End
- Begin VB.CommandButton Play
- Caption = "Tuesday"
- Height = 495
- Index = 1
- Left = 720
- TabIndex = 0
- Top = 720
- Width = 2535
- End
- Attribute VB_Name = "PlayDays"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Declare Function mciSendString Lib "winmm.dll" _
- Alias "mciSendStringA" (ByVal lpstrCommand As String, _
- ByVal lpstrReturnString As String, _
- ByVal uReturnLength As Long, _
- ByVal hwndCallback As Long) As Long
- Private Sub Form_Unload(Cancel As Integer)
- cmd = "close day"
- errorCode = mciSendString(cmd, returnStr, 255, 0)
- End Sub
- Private Sub Play_Click(Index As Integer)
- Dim errorCode As Integer
- Dim returnStr As Integer
- Dim cmd As String * 255
- ' make sure that device with the DAYS alias is open
- cmd = "close days"
- errorCode = mciSendString(cmd, returnStr, 255, 0)
- ' now open the DAYS.WAV file as DAYS
- cmd = "open " & Chr(34) & App.Path & "\days.wav " & Chr(34) & " type waveaudio alias days"
- errorCode = mciSendString(cmd, returnStr, 255, 0)
- If errorCode <> 0 Then
- MsgBox "There was an error on opening the DAYS.WAV file." & vbCrLf _
- & "Please make sure the DAYS.WAV file in the same folder as the application"
- Exit Sub
- End If
- Select Case Index
- Case 0: errorCode = mciSendString("play days from 150 to 850 wait", returnStr, 255, 0)
- Case 1: errorCode = mciSendString("play days from 1200 to 1900 wait", returnStr, 255, 0)
- Case 2: errorCode = mciSendString("play days from 2200 to 2900 wait", returnStr, 255, 0)
- Case 3: errorCode = mciSendString("play days from 3100 to 4000 wait", returnStr, 255, 0)
- Case 4: errorCode = mciSendString("play days from 4300 to 4900 wait", returnStr, 255, 0)
- Case 5: errorCode = mciSendString("play days from 5100 to 5800 wait", returnStr, 255, 0)
- Case 6: errorCode = mciSendString("play days from 6100 to 6800 wait", returnStr, 255, 0)
- End Select
- End Sub
-