by John Avison (2 Submissions)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(13 Votes)
Will Read Out Whatever You Type In!
Inputs
Insert MSAGENT control and name it Agent1
Insert TEXT BOX and name it Text1
Insert COMMAND BOX and name it Command1
API DeclarationsConst merlin = "merlin.acs"
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Command1_Click()
On Error Resume Next
Set mer = Agent1.Characters("merlin")
mer.LanguageID = &H409
mer.Show
mer.Stop
mer.Speak Text1.Text
End Sub
Private Sub Form_Load()
Agent1.Characters.Load "merlin", merlin
Set mer = Agent1.Characters("merlin")
End Sub