Start a new project, place an agent control on the form then add one drop down lists and two command buttons to the form, you may also want to add the Agents label but it is not necessary. Name the dropdown list cmbAgent and set it's Style property to Dropdown List (2). Double click on the form to replace it's content with the following code.
Option ExplicitDim miFormLeft%, miFormTop%Dim msLocalPath$Dim msAgentName$Dim theAgent As IAgentCtlCharacterDim reqHBPrivate Sub Form_Load() On Error Resume Next CenterForm LoadAgent "merlin" FillAgentsListEnd SubSub CenterForm() Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2 miFormLeft = Me.Left \ Screen.TwipsPerPixelX miFormTop = Me.Top \ Screen.TwipsPerPixelY ShowEnd SubSub LoadAgent(sAgentName) msLocalPath = "c:\program files\microsoft agent\characters\" msAgentName = sAgentName Agent1.Characters.Load sAgentName, msLocalPath & sAgentName & ".acs" If Err = 0 Then Set theAgent = Agent1.Characters(sAgentName) Dim x%, y% Randomize x = Int((Screen.Width \ Screen.TwipsPerPixelX - theAgent.Width) * Rnd) y = Int((Screen.Height \ Screen.TwipsPerPixelY - theAgent.Height) * Rnd) theAgent.MoveTo x, y theAgent.Show Else MsgBox "Cannot load " & sAgentName End End IfEnd SubSub FillAgentsList() On Error Resume Next cmbAgents.AddItem "genie" cmbAgents.AddItem "robby" Set reqHB = theAgent.Speak("Select another agent from the dropdown list.")End SubPrivate Sub cmbAgents_Click() On Error Resume Next LoadAgent (cmbAgents.Text)End SubPrivate Sub Agent1_RequestComplete(ByVal Request As Object) Select Case Request Case reqHB theAgent.Balloon.Visible = False End SelectEnd SubPrivate Sub Agent1_Click(ByVal CharacterID As String, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Integer, ByVal y As Integer) Set theAgent = Agent1.Characters(CharacterID) Set reqHB = theAgent.Speak("I'm now the active agent.")End SubPrivate Sub Command1_Click() Set reqHB = theAgent.Speak("My name is " & theAgent.Name & ".")End SubPrivate Sub Command2_Click() Set reqHB = theAgent.Speak("I'll do anything you want. Well... almost!")End SubSince you do not want the agents to appear one over the other, Randomise and Rnd are used in LoadAgent() to place the agents randomly on the screen. When using a character variable (theAgent) in your code, you just need to Set theAgent = Agent1.Characters(CharacterID) in the Agent1_Click() event.