BenVercammen Posted April 16, 2004 Posted April 16, 2004 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! Quote
TechnoTone Posted April 16, 2004 Posted April 16, 2004 Try either Me.Refresh or Application.DoEvents. Quote TT (*_*) There are 10 types of people in this world; those that understand binary and those that don't.
Wile Posted April 16, 2004 Posted April 16, 2004 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. Quote Nothing is as illusive as 'the last bug'.
TechnoTone Posted April 16, 2004 Posted April 16, 2004 Ah yes - I missed the "and clickable" bit. Sorry. Yes - a separate thread would be the way to go in my opinion. Quote TT (*_*) There are 10 types of people in this world; those that understand binary and those that don't.
tuxp3 Posted April 17, 2004 Posted April 17, 2004 Multithreading tutorial on it, not hard to do http://xtremedotnettalk.com/showthread.php?t=70749 Andrew Quote
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.