Using Ms-Agent In Visual Basic:-
The Requirement: 1.Microsoft Agent 2.0 and above. 2.Microsoft Agent Character.
Showing the character and let him talk.
The Code of VB. 1.Open Visual Basic and start with starndard form. 2.click Project and choose Components or click Ctrl+T as a shortcut. 3.Choose Microsoft Agent Control 2.0. 4.A new control will appear in the Toolbox. 5.Double Click at the new control in the Toolbox. 6.Transper to the code page by clicking view the code. 7.type the following: Dim char as IAgentCtlCharacterEx 8.return to your form by clicking view then object or Shift+F7 as a shortcut. 9.Add a command button and double click on it. The code page will apear. Between these to lines below type the following to show the character. Private Sub Command1_Click() Call Agent1.Characters.Load(a, "Max.acs") Set char=Agent1.Characters.Item(a) char.show(fast) End Sub 10.Add a new command button. Write again this code in the code section. Private Sub Command2_Click() char.speak("Write your text here.") End Sub
Make Different Animations:
Let it show: char.show Hide the character: char.hide Let it talk: Char.Speak "Your Message Here" Let it think: Char.Think "Your Message Here" Let it Stop animating: char.stop Write and Stop char.Play "Write" Countinues Writing char.Play "Writing" Read and stop char.Play "Read" Countinues reading char.Play "Reading" Process and stop char.Play "Process" Countinues Processing char.Play "Processing" Search and stop char.Play "Search" Countinues Searching char.Play "Searching" Acknowledge char.play "Acknowledge" Alert and Shocked char.play "Alert" Blink it's eye char.play "Blink" Make Him Confuse char.play "Confused" Make Him Decline char.play "Decline" Don't Regognize char.play "DontRecognize" Hearing Type1 char.play "Hearing_1" Hearing Type2 char.play "Hearing_2" Hearing Type3 char.play "Hearing_3" Hearing Type4 char.play "Hearing_4" To be pleased char.play "Pleased" To be sad char.play "Sad" Surprised char.play "Surprised" Uncertain. char.play "Uncertain" Agent1_IdleStart event. char.play "Idle1_1" char.play "Idle1_2" char.play "Idle1_3" char.play "Idle1_4" char.play "Idle1_5" char.play "Idle1_6" char.play "Idle2_1" char.play "Idle2_2" char.play "Idle2_3" char.play "Idle3_1" char.play "Idle3_2" char.play "Idle3_3" 'Gestures Up char.play "GestureUp" 'Gestures Right char.play "GestureRight" 'Gestures Left char.play "GestureLeft" 'Gestures Down char.play "GestureDown" 'Explains Something char.play "Explain" 'Gets the users attention char.play "GetAttention" 'Greets the User (by action) char.play "Greet" char.play "Announce" 'Congratulates user char.play "Congratulate_1" Congratulates user char.play "Congratulate_2" ' char.play "DoMagic1" char.play "DoMagic2" 'Starts Listening char.play "StartListening" 'Stops Listening char.play "StoptListening" Making Him Look Somewhere The character can look at different angles. char.play "LookDown" 'Looks Down 'Looks and Blinks char.play "LookDownBlink" 'Stops looking and returns to restpose char.play "LookDownReturn" 'Looks Up char.play "LookUp" 'Looks and Blinks char.play "LookUpBlink" 'Stops looking and returns to restpose char.play "LookUpReturn" 'Looks to the Right char.play "LookRight" 'Looks and Blinks char.play "LookRighBlink" Stops looking and returns to restpose char.play "LookRightReturn" 'Looks to the Left char.play "LookLeft" 'Looks and Blinks char.play "LookLeftBlink" 'Stops looking and returns to restpose char.play "LookLeftReturn"
Here are some of what you need:
Characters: [Max] [Peedy] [Genie] [santa]
Microsoft Msagent 2.0