Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've been wondering about the following problem; I'm making a form (sort of progress bar) that pops up in front of another form, and has a label, a progressbar and a cancel button on it.

Now, the problem is, when the form pops up, only the progress bar is displayed propperly, while the label and the button will only be displayed at the end when the process is completed.. while the process is going on, there are just holes in the form and i can still see my spider solitair game of 20 minutes ago on it :p

of course i'd like to have the label and especially the cancel button displayed (and clickable) before the whole process starts, but so far, i haven't managed to do this..

any suggestions?

thx in advance!

Posted
Try either Me.Refresh or Application.DoEvents.

 

Me.Refresh would show the button, but you still cant use it ;).

You can use a lot of Application.DoEvents and it should let the Cancel button work.

 

Another solution would be to use a seperate thread that handles the long process with occasional progress updates and checks if the cancel button is pressed. This is a lot more complicated though.

Nothing is as illusive as 'the last bug'.
Posted

Ah yes - I missed the "and clickable" bit. Sorry.

 

Yes - a separate thread would be the way to go in my opinion.

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

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