I have this codes in my VB.Net application:
screenHost.SendKeys ("<Enter>")
Do While screenhost.OIA.Xstatus <> 0
Loop
But when the host (that my application is connected to) does not respond, it caused my application hang.
What is the best way to exit my application gracefullly when the host fails to respond?
Should I put DoEvents inside the loop?
Thanks
screenHost.SendKeys ("<Enter>")
Do While screenhost.OIA.Xstatus <> 0
Loop
But when the host (that my application is connected to) does not respond, it caused my application hang.
What is the best way to exit my application gracefullly when the host fails to respond?
Should I put DoEvents inside the loop?
Thanks