NicoVB Posted June 26, 2003 Posted June 26, 2003 Hi I'm loading in my app a few controls dynamic in code in a loop. But when this executes your screen shows some drawed white boxes, but you can't do anything in the program until the execution is done and all the controls have been created. How do you enable to do something for the user with the first controls that are allready displayed while the other controls are still loading??? Thanks Nico Quote Visit http://www.nico.gotdns.com Now ONLINE!
Administrators PlausiblyDamp Posted June 26, 2003 Administrators Posted June 26, 2003 using Application.DoEvents inside the loop will give windows a chance to repaint the form and also process the message loop so the user can move the form etc. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
JABE Posted June 26, 2003 Posted June 26, 2003 Another option is to use a separate thread to render your controls so that the form's thread is not blocked. Quote
NicoVB Posted June 26, 2003 Author Posted June 26, 2003 Thank you both But JABE>>> If you run that in a separate thread will the window then repaint it also ??? and PlaysiblyDamp>>> Is this not bad for performance??? Quote Visit http://www.nico.gotdns.com Now ONLINE!
*Experts* Nerseus Posted June 27, 2003 *Experts* Posted June 27, 2003 Have you tried using this.SuspendLayout() or Me.SuspendLayout()? Don't forget to call ResumeLayout when you're done. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
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.