This is the sample RSC of my Basic Talking Alar Clock
Ok First Search kayo nito then Install mo.. ==> spchapi.exe then pag na install mo na..
Open mo ang VB6 Then Creat an new Project ka... then Import mo sa Reference ang
Microsoft Speech Object Library then pag ok na sa Form na tayo..
1. Need nyo ng Two Label Label1 and Label2. Ang Label1 for 12 Hrs Format Time
ang Label2 For 24 Hrs Format time...
2. Need nyo ng Three Text Box para sa Set Alarm at Nick at Message na Gusto mo sa Talking Alarm Clock nyo..
3. One CheckBox
4. and One Timer
Now For the Code
- Code:
-
Option Explicit
Dim Voice As SpVoice
Private Sub Check1_Click()
If Check1.Value = Checked Then
Text2.Text = "Hello master " & Text3 & " The Time is " & Text1.Text
End If
End Sub
Private Sub Form_Load()
Set Voice = New SpVoice
End Sub
Private Sub Timer_Timer()
Dim tmTime As Date
tmTime = TimeValue(Now)
Dim intHour As String
Dim intMinute As String
Dim intSecond As String
Dim Lmp As String
intHour = Hour(Now)
intMinute = Minute(Now)
intSecond = Second(Now)
Label1 = Format(Time, "h:mm AM/PM")
Label2 = intHour & ":" & intMinute & ":" & intSecond
If Check1.Value = Checked Then
If Label1.Caption = Text1 Then
Voice.Speak Text2, SVSFlagsAsync
Check1.Value = Unchecked
End If
End If
End Sub