Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Visual Basic 2008 Talking Alarmclock

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,777
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 8, 2009

Make your alarm clock talk. This is just a simple alarm clock program in Visual Basic 2008 that will read the message that you type into the settings tab. Here is the code.

Clock Form


Public Class Form1 Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Label1.Text = TimeOfDay + " " End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If TimeOfDay = Label2.Text Then Dim SAPI SAPI = CreateObject("sapi.spvoice") SAPI.Speak(TextBox2.Text) End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label4.Text = DateString End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click settings.Show() End Sub
End Class



Settings Form




Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Form1.ControlBox = True End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Form1.ControlBox = False End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Form1.Timer1.Stop() Form1.Label2.Hide() End Sub Private Sub settings_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub
End Class

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Video Responses

This video is a response to VB.net 2008 beginner tutorial Part 4
see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more