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 the 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 the code:
using namespace Interop;
static AgentObjects::IAgentCtlCharacterEx* myGenie;
static String* DATAPATH_1 = "genie.acs";
private:
System::Void button1_Click(System::Object * sender,
System::EventArgs * e)
{
axAgent1->Characters->Load("Genie", DATAPATH_1);
myGenie = axAgent1->Characters->Character("Genie");
myGenie->Show(myGenie);
}
Building is fulfilled without errors, but after Start we do not see Genie.
How in VC++ .NET 2003 to write this code, to see character of Microsoft
Agent?
Beforehand many thanks for the answer, Dr. Zharkov V.A., Moscow, Russia.