Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Date and Time TTS
Author:
Siddharth
Submitted:
4/23/2006
Version:
VB.NET 2003
Compatibility:
VB.NET 2002, VB.NET 2003, VB 2005
Category:
Date/Time
Views:
20977
This is a project where when you click at the button it will speak today's date and time.
Declarations:
Option Explicit 'Declare the SpVoice object. Dim cusvoice As SpVoice ''Not Forget to include Micrsoft Speech Object Library from 'Project->References
Code:
Private Sub Form_Load() ' Initialize the voice object Set cusvoice= New SpVoice End Sub Private Sub btnSpeak_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFit.Click ' SVSFlagsAsync flag to speak asynchronously and return immediately from this call. Text1.Text = Now() If Not Text1.Text = "" Then Voice.Speak Text1.Text + "is the time", SVSFlagsAsync End If ' This is used to Return focus to text box 'TextField.SetFocus Exit Sub End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement