Лабораторная работа: Audio recorder on visual basic
Private Sub cmdStopTime_Click ()
Dim wrst As String
wrst = WaveRecordingStopTime
If wrst < WaveRecordingStartTime Then wrst = WaveRecordingStartTime + TimeSerial (0, 15, 0)
wrst = InputBox ("Enter stop time recording", "Stop time", wrst)
If wrst = "" Then Exit Sub
If Not IsDate (wrst) Then
MsgBox ("The time you entered was not valid!")
Else
' String returned from InputBox is a valid time,
' so store it as a date/time value in WaveRecordingStartTime.
If CDate (wrst) < WaveRecordingStartTime Then
MsgBox ("The stop time has to be later then the start time!")
WaveRecordingStopTime = WaveRecordingStartTime + TimeSerial (0, 5, 0)
Else
WaveRecordingStopTime = CDate (wrst)
End If
End If
End Sub
Private Sub Form_Load ()
Select Case Rate
Case 44100
optRate44100. Value = True
Case 22050
optRate22050. Value = True
Case 11025
optRate11025. Value = True
Case 8000
optRate8000. Value = True