Hi, I'm fairly new to VB programming (but not new to programming in general). I am trying to figure out how to make a microsoft agent character do something, and then make the program wait until the character has finished doing it, and then execute more code. I have looked it up and found some sites that say how to do it, but it doesn't seem to be working. Can someone tell me what's wrong with this code:
agent.Show()
controlRequest.Status never equals 0 (Request complete), like it is supposed to. It is constantly 2 (Request pending)Code:Dim controlRequest As Object controlRequest = agent.Speak("Hello, I'm just wasting some time") agent.Play("Idle2_2") While controlRequest.Status <> 0 Thread.Sleep(250) End While Label1.Text = "It works!"
How do I fix this?
Thanks,
WobbleU




Reply With Quote