by Dominic R (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 18th April 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Using Microsoft Agent Control
API Declarations
Const DATAPATH = "\windows\msagent\chars\merlinsfx.acs"
' 2.) on the form put a text box with multiline set to true
' 3.) a command button and put the code below for the button and form
' 4.) DON'T FORGET TO PUT THE MICROSOFT AGENT CONTROL ONTO THE FORM!
' AGENT CONTROL IS CALLED "AGENTCTL.DLL" (MICROSOFT AGENT CONTROL 2.0)
Private Sub Command1_Click()
Genie.Show
Genie.Speak Text1.Text
Genie.Hide
End Sub
Private Sub Form_Load()
Agent1.Characters.Load "Genie", DATAPATH
Set Genie = Agent1.Characters("Genie")
Text1.Text = "Hello World!"
End Sub