Results 1 to 2 of 2

Thread: Showing Microsoft Agent

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Posts
    18

    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?

  2. #2
    New Member
    Join Date
    May 2004
    Posts
    5
    you should declare it as AgentObjects.IAgentCtlCharacter, not
    AgentObjects.IAgentCtlCharacterEx:

    Private Merlin as AgentObjects.IAgentCtlCharacter

    And the last line should be
    Merlin.Show(0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width