Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.

Posted

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.

mov ax, 13h

int 10h

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...