Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have my program displaying a label (just says Please wait... blah blah blah) while some code is being run (it takes a while). Well, if my form loses focus and then gains focus... it turns all white until the code is done executing. Since this could cause the user to think the application is crashing, is there anyway to prevent this. This happened in VB6 too but wasn't as much of a problem with programs I wrote under that.

 

Thanks... :)

  • *Experts*
Posted

Are you in a loop? If you are, you could try a few things.

 

For one, you could put Application.DoEvents() at the end of your loop

(right before the 'Loop' part). Another way is to put Me.Refresh() at

the end of the loop.

 

If the code is in some place where you don't have the source, I don't know.

You could look into threading, but there may be an easier way.

Posted
Thanks.... the me.refresh() didn't work, but the Application.DoEvents() worked great. I was trying to invoke that as just plain DoEvents earlier... completely forgot how to call that in .net. :)

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