Using Microsoft Agent in Windows .Net Application

MS Agent is a graphical character that might be used for animated help, learning etc.

Microsoft® Agent is a software technology that enables an enriched form of user interaction that can make using and learning to use a computer, easier and more natural.

MS Agent can be easily integate into windows .net application. Below is the step by step process to add MS Agent into you .net application and do basic animation.

Step 1

Create a new .net windows application

Step 2

Add AxAgent control in the ToolBox from the COM Components. To do this right click on tool box and select "Chose Item". A pop up will appear. Select "COM Components" and scroll down to "Microsoft Agent Control 2.0". Select and add reference to your application.

Step 3

A new control "AxAgent" will appear in the ToolBox. Add this control to you windows form by dragging it on the form.

Step 4

Open the source of the form and create a new character.

public partial class Form2 : Form
  AgentObjects.IAgentCtlCharacter character;

Step 5

Now, we have to intialize the agent on form load. To do this add below code

private void Form2_Load(object sender, EventArgs e)
	this.axAgent1.Characters.Load("merlin", "merlin.acs");
	this.character = this.axAgent1.Characters["merlin"];

If you see above code then you may notice that we are using "Merlin" agent. To use any agent, you must have that agent installed on your system. You can download agents from the Microsoft Agent website.

You agent is ready. You can animate this by using its commands. Below are some animation samples.


this.character.MoveTo(120, 120, null);


this.character.Speak("Welcome to DailyCoding..!!", null);

Other Animations



4 comment(S)

ferydungu on Dec 4, 2008 04:32 PM

can i get javascript code to set in my friendster
coz i ever seen a user user agent character to her friendster
please sent to my email

thanks a lot

raldzkie on Aug 7, 2009 05:09 AM

can i get javascript code too .. i want to set my friendster..
i also seen that user uses agent character..
pls sent it to my mail"

tnx. :D

Rahul Chitte on Jul 5, 2010 10:58 PM

Looks good!!

ENG AHMED ADLY on Jun 2, 2012 05:40 AM

Thank you very much.

Leave a comment