Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Msagent, how do I wait till its done
Message
De
03/04/2003 16:09:10
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Msagent, how do I wait till its done
Divers
Thread ID:
00773778
Message ID:
00773778
Vues:
60
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()
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform