Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I have a program wich at some points checks whether a flag is true or false like this.

 

 

While barriendo = True 'espero a que termine de barrer

Application.DoEvents()

End While

 

......rest of the code here......

 

 

when "barriendo" si true I go on executing the rest of the code. I´ve put the doevents there to let my app run while waiting for barriendo to turn true.

This flag is modified at some other point in my app.

The problem is that my programa stucks in this while loop and never lets the other part of the app (where I put barriendo =false) execute.

Can anybody help me???

Bye

Hernan

  • Administrators
Posted

Application.DoEvents will allow your application to process it's windows messages (things like repainting the windows, handle mouse movement etc).

However it will not allow your application to do 2 things simultaniously (sp?), if you require multiple concurrent bits of code to be running you will need to investigate threading. If you post some code / give a bit more detail about your problem then there may be an alternate solution.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

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