To see character of Microsoft Agent in Visual Basic .NET 2003, we create the
project: File, New, Project, Visual Basic Project, Windows Application. In
Form1 we place two controls: Button and Microsoft Agent Control 2.0. We
write down a code:
Dim myGenie As AgentObjects.IAgentCtlCharacterEx
Const DATAPATH_1 As String = "genie.acs"
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
AxAgent1.Characters.Load("Genie", DATAPATH_1)
myGenie = AxAgent1.Characters("Genie")
myGenie.Show()
End Sub
After Start and click of button we see Genie.
To see character of Microsoft Agent in Visual C++ .NET 2003, similarly we
create the project: File, New, Project, Visual C++ Projects, (.NET), Windows
Forms Application (.NET). In Form1 we place two controls: button and
Microsoft Agent Control 2.0. We write down a code:
using namespace Interop;
static AgentObjects::AgentClass* myGenie =
new AgentObjects::AgentClass();
static String* DATAPATH_1 = "genie.acs";
private:
System::Void button1_Click(System::Object * sender,
System::EventArgs * e)
{
myGenie->Characters->Load("Genie", DATAPATH_1);
myGenie->add_Show(0);
}
After Start and click of button we do not see Genie.
How in Visual C++ .NET 2003 to write down this code, to see character of
Microsoft Agent?
Beforehand many thanks for the answer, Dr. Zharkov V.A., Moscow, Russia.