-
Showing Microsoft Agent
I add a Microsoft Agent 2.0 Control into the Form1 of my VB.NET Project and I put this code. The location of my ACS file is at C:\Merlin.acs.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Const Datapath = "C:\Merlin.acs"
Dim Merlin As AgentObjects.IAgentCtlCharacterEx
AxAgent1.Characters.Load("Merlin", Datapath)
Merlin.Show()
End Sub
I know this code is not right. Kindly help me to correct this code?
-
you should declare it as AgentObjects.IAgentCtlCharacter, not
AgentObjects.IAgentCtlCharacterEx:
Private Merlin as AgentObjects.IAgentCtlCharacter
And the last line should be
Merlin.Show(0)