Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who have the sample code using MS Agent?
Message
From
24/09/1998 12:32:12
 
 
To
24/09/1998 10:16:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00140345
Message ID:
00140433
Views:
25
>I try to use MS Agent ActiveX Control in VFP! What should I do?
>Any sample code! Thank you!

Here's the code, once the controls are on the form.


*****
Thisform.Agent1.Characters.load("Genie", "genie.acs")
Thisform.Agent1.Characters.load("Merlin", "Merlin.acs")

Genie = Thisform.Agent1.Characters("Genie")
Merlin = Thisform.Agent1.Characters("Merlin")

Genie.Get("Animation", "Annouce, AnnouceReturn, Pleased, PleasedReturn")
Merlin.Get("Animation", "Confused, ConfusedReturn, Sad, SadReturn")

Genie.MoveTo(100,100)
Genie.Show

Merlin.MoveTo(300,100)
Merlin.Show

Genie.Play("Annouce")
GenieRequest = Genie.Speak(" Why did the chicken cross the road?")

Merlin.Wait(GenieRequest)
Merlin.Play("Confused")
MerlinRequest = Merlin.Speak("I don't know. Why did the chicken cross the road?")

Genie.Wait(MerlinRequest)
Genie.Play("Pleased")
GenieRequest = Genie.Speak("To get to the other side.")

Merlin.Wait(GenieRequest)
Merlin.Play("Sad")
MerlinRequest = Merlin.Speak("I never should of asked.")

********** End ***

Code Originally from Henry W. Petry IV


Hope this helps
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform