Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Msagent, how do I wait till its done
Message
From
03/04/2003 16:09:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Msagent, how do I wait till its done
Miscellaneous
Thread ID:
00773778
Message ID:
00773778
Views:
61
I am using the msagent charachter in one of my apps.

I would like to hide the current form
display a new form
have the character talk
then close the new form
and show the original form

This all works fine, but the timing is wrong. Everything flashes by, leaving the character talking on the original form. How can I force foxpro to wait until the msagent has finished speaking before closing the new form.

here is my code
loAgent = thisform.Agent.Characters(JUSTSTEM(thisform.agent.Comment))
** delete the image of the agent and create the agent in a similar location

** there is code in the form's moved method so that the agent will follow the form.
thisform.Hide()
thisform.ostatemanager.openform('tool.scx')

LOCAL lnLeft, lnTop
lnLeft=thisform.Left+20
lnTop=thisform.Top+100
thisform.image1.Visible=.f.
WITH loAgent
	.moveto(lnLeft,lnTop)
	.show()
	.play("pleased")
	.Speak("\emp\Welcome...")
	.play("domagic1")
	.play("domagic2")
	.speak("I am the Tooling wizard")
	.play("pleased")
	.speak("The folks at Elizabeth Carbide have asked me to guide you along the path to organization.")	
endwith

thisform.ostatemanager.closeform('tool.scx')
thisform.Show()
Next
Reply
Map
View

Click here to load this message in the networking platform