Share via


Microsoft Agent Utility Foundation Class

Category System Utilities
Default Catalog Visual FoxPro Catalog\Foundation Classes\Utilities
Class _agent
Base Class Custom
Class Library _agent.vcx
Parent Class _custom
Sample ...\Samples\Solution\Ffc\Agent.scx

Remarks

This class gives you access to Microsoft Agent API routines so that you can integrate agents (similar to Office Assistants) such as Peedy the parakeet into your application.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class icon on the form. You can specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
ActiveAgent property Specifies the name of the active Agent.

Default: .F.

AgentControl property Provides a pointer to the agent object.

Default: .F.

ErrorOccurred property Specifies whether an error occurred.

Default: .F.

ErrorState property Determines the state of the control during an error.

Default: LOAD

GestureAt method Causes the active agent to gesture at a given point.

Syntax: GestureAt(tnX, tnY, tnCoords, toObj)

Return: none

Arguments:

tnX specifies x coordinate.

tnY specifies y coordinate.

tnCoords whether coordinates are local or world.

toObj specifies the object reference for LocalToWorld conversion.

Hide method Hides the active agent.

Syntax: Hide( )

Return: none

Arguments: none

Interrupt method Interrupts an animation.

Syntax: Interrupt(toRequest)

Return: logical

Arguments:

toRequest specifies request object.

Load method Loads an agent character from the specified location (can be a file or URL).

Syntax: Load(tcAgentName, tcAgentLocation)

Return: logical

Arguments:

tcAgentName specifies name of agent

tcAgentLocation specifies the agent file.

LocalToWorld method Converts local coordinates to world coordinates.

Syntax: LocalToWorld(tnAxis, tnPos, toObj)

Return:tnPos

Arguments:

tnAxis specifies the axis.

tnPos specifies axis coordinate.

toObj specifies object to which conversion is relative.

MoveBy method Moves the active agent by the passed values in the x or y direction.

Syntax: MoveBy(tnX, tnY, tnCoords, toObj)

Return: none

Arguments:

tnX specifies x coordinate.

tnY specifies y coordinate.

tnCoords specifies whether coordinates are local or world.

toObj object reference for LocalToWorld conversion.

MoveTo method Moves the default agent or agent passed to the location specificed.

Syntax: MoveTo(tnX, tnY, tnCoords, toObj)

Return: none

Arguments:

tnX specifies x coordinate.

tnY specifies y coordinate.

tnCoords specifies whether coordinates are local or world.

toObj object reference for LocalToWorld conversion.

Play method Causes the active agent to play an animation.

Syntax: Play(tcAnimation)

Return: logical

Arguments:

tcAnimation specifies animation to play.

SetActiveAgent method Sets the active agent to the agent with the passed name.

Syntax: SetActiveAgent(tcAgentName)

Return: logical

Arguments:

tcAgentName specifies the name of the agent.

Show method Displays the active agent.

Syntax: Show(tnX, tnY, tnCoords, toObj)

Return: none

Arguments:

tnX specifies x coordinate

tnY specifies y coordinate

tnCoords specifies whether coordinates are local or world.

toObj object reference for LocalToWorld conversion.

Speak method Causes the active agent to speak the passed phrase.

Syntax: Speak(tcText)

Return: logical

Arguments:

tcText specifies text to speak.

Stop method Stops a looping animation.

Syntax: Stop( )

Return: none

Arguments:

Wait method Waits for a request to complete.

Syntax: Wait(toRequest)

Return: logical

Arguments:

toRequest specifies the requesting object.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Classes