Using MS Agent

Posted on 2006-04-26
Last Modified: 2010-05-18
Hi Experts,

I am trying to make an agent appear and speak on a form. I have downloaded the following:

1. microsoft speech recognition engine  
2. microsoft text to speech engine  
3. microsoft speech API  

I have the following code:

Private character As AgentObjects.IAgentCtlCharacter

Dim agent_location As String = "c:\windows\msagent\chars\"

        AxAgent1.Characters.Load("Peedy", agent_location & "Peedy.acs") 'problem here
        'Set current character to Peedy and show it
        agentID = "Peedy"
        character = AxAgent1.Characters(agentID) 'problem here

once the agent character has been created, i want to make it appear and speak on different button clicks

button1 - character.Show(0)
button2 - character.Speak(TextBox1.Text)

The problem: AxAgent1 is a control object, which i dont know how to get onto the form. It is of type AxAgentObjects.AxAgent. I have tried 'Project' 'Add reference' and cant find this.

How do i get this control on the form??

Question by:ab2ae
    LVL 8

    Expert Comment

    just a guess but try

    Private character As NEW AgentObjects.IAgentCtlCharacter

    then in form load or decleration


    Author Comment


    I dont want the AgentObjects.IAgentCtlCharacter as a form control i need AxAgentObjects.AxAgent as a form control, it is a man with a hat on, an agent
    LVL 8

    Accepted Solution


    right click on your toolbox, Add/Remove items

    should appear under the COM Components tab i think

    Author Comment

    Using Visual Studio 2005

    Import references below:

    ‘Microsoft Direct Text-to-Speech’
    ‘Microsoft Agent Control 2.0’

    Then right-click on toolbox 'Choose Items..' then 'COM Components' tab then 'Microsoft Agent Control 2.0'

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now