On my forms with many (50+) controls it takes many MINUTES to load the
form in designer view. The problem is magnified with forms using
UserControl derived formss. I'm using a more than adquate system
too. Is there a fix or a workaround to address this or at least improve
it because it really hinders rapid development when you have to wait
minutes each time the designer needs to be re-loaded, which is
basically every time the header file is modified.
Thank you for any advice!
(i am using managed c++)

Why is VS 2003 Designer Mode so slow in loading some forms?
Yifan Lu
Like I've said, forms with UserControls still open slower than forms with just windows controls but it seems that the real killer is if the form is part of a large project.
This problem is happening on every developer machine we have (which means 8 machines). They are XP.
Any ideas on what i can do to improve this based on this new information
Thanks again.
bighog
These are all very good questions if you can answer them. Sorry for the slow response.
Another question is that once the form is displayed, is it faster to show it again in the designer ie -- is it an issue loading your referenced assemblies from disk If it is still slow, are you using a lot of nested containers that are doing layout
jeffrafter
Does anyone have an answer to our problem
Bernard_Lambert
I'd be glad to post an example project somewhere so everyone can see it. Like I said, if you just add a bunch of Windows buttons/panels/lists to a form, the problem still happens, it's just worse with UserControls. Maybe if i wrote the user controls in win32 it would be faster.
Thanks for the advice though - i will see what i can optimize.
techstud
LaurenEckert
btw: InitializeComponent is not called, it is parsed at design time...
Hannotje
What does "a while" mean Obviously, the more controls on a form, the longer the designer will take to open that form. But you're right: if this were a common problem, it would have been reported, and you would see lots of people complaining about it. Since you dont see that, its probably a safe bet that there is something specific about your scenario which is causing the slowdown.
You can use the DesignMode property of a control to determine whether you should take some action (such as painting) based on whether you are at design time or not. Have you examined your custom painting code to determine if it is fully optimized Because a control might be repainted very often in certain scenarios, it is important that paint handlers be as fast as possible. Use caching and pre-calculation to minimize the amount of time your handler takes to execute.
Steven Barden
This is just an example of one form though. There are other forms I have that take very long to load too and have no custom controls at all - just hundreds of regular Windows controls. I believe that the UserControl derived controls are individually more expensive to load though. However, it's not like the issue is *limited* to these controls.
Every time i open the form it takes the same amt of time to load up. Even if i change something minor in the header, it re-loads. So this is not a 1 time overhead thing. It is a major slow down as the form is re-loaded often in the designer.
I am using VS2003. on WinXP sp2. Managed C++ .Net. So it is calling the InitializeComponent function each time it tries to load a form in the designer.
I understand that there may be nothing I can do about this but I appreciate any advice that could help even 20%.
Thank you
Tibor19
katokay
Muhammad.Umair
Take a look at an article we published in improving performance at:
http://msdn.microsoft.com/msdnmag/issues/06/03/WindowsFormsPerformance/default.aspx
This may give you some ideas on improving perf in your scenarios. However, just adding some panels and buttons should not take a long time.
You can also try disabling the "AutoToolboxService" (Tools->Options->WindowsForms/AutoToolboxPopulation) and see if that makes any difference.
Other than that, it may be unique to your machine. I would try to open your project on another machine with VS2005 installed if thats an option.
james_paul_p
QUESTION: Is there any way to remove some functions in the designer but have them put back at runtime
Thanks
sriwithaquestion
Perhaps the reason you are getting no response is that you have provided no information that would help someone in troubleshooting your situation. What operating system/service pack do you have What are your hardware specs How many controls do you have on your form What types are they Do you have custom controls, and what do they do Are you using visual inheritance How deep is your inheritance tree How complex are the base forms compared to the derived forms Are you doing custom painting Do you have controls with image backgrounds Have you tried disabling anti-virus software Can you post a code sample, or a sample project that reproduces the problem
This is a volunteer-driven forum. There are plenty of people on this forum who would be more than willing to help. However, most of us have our own full time jobs, and are not interested in wasting time shooting at your problem in the dark. To give yourself a better chance of a timely response, try providing as much information as you can up front.
Leland