Administrators PlausiblyDamp Posted March 28, 2004 Administrators Posted March 28, 2004 Yes but the command MessageBox.Show will block until the user clicks ok, therefore the sendkeys command won't execute until after tthe messagebox has been clicked on. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Ace Master Posted March 29, 2004 Author Posted March 29, 2004 This thread was excatly what I needed to do in my application. However, when I try typing it in, it gives me an error during my decalration of... Dim stai AS New wait It says the type 'wait' is not declared. Am I missing something? :confused: well.....the "wait" is a form...and maybe you don't have a form named wait. Quote
Threads Posted March 30, 2004 Posted March 30, 2004 Suggestion If you are going to be using a loop such as: Do Until intBlah = 3 Application.DoEvents() Loop [ In most cases, it would be good to add a System.Threading.Thread.CurrentThread.Sleep so that system utilization won't be so high. For example: Do Until intBlah = 3 Application.DoEvents() System.Threading.Thread.CurrentThread.Sleep(20) Loop If you compare the two code-snippets, you will notice that the CPU utilization for the 2nd one is significantly lower than the first. If you are waiting for user input or something similar without tons of other stuff processing on the same thread, there will be no noticable delay in responsiveness at all. Afterall, it is just 20 milliseconds. Quote mov ax, 13h int 10h
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.