Is there any method to speed up the display and rendering of Windows Form In my application, my Windows forms containing around 50~150 controls. There are also some navigation button to hide one form and display another one. The delay occur during form showing up.
As I'm developing a POS, such kind of delay is not preferable. Is there any workaround to speed this up

Slow in form display
Dave Waterworth
You can usually do a few tricks to make things somewhat more bearable.
Set all controls properties (size, location, text, etc) before adding them to the Controls collection.
Limit the number of containers (panels inside of panels inside of panels, etc).
If you need to shift a lot of controls around, or swap them in and out, then place them in a panel, and remove the panel from the Controls collection temporarily while manipulating the controls within it.
Basically, any operation that causes a control (or it's parent) to repaint will be slower if the control has been placed on the screen... so avoid that.
Polina159216
We have customers using custom graphical objects for POS applications. It is essentially as the earlier poster described, except they use a retained mode system. You can create thousands of "controls" this way. You can see an example of something similar to POS here:
http://www.vgdotnet.com/articles/translucent_calculator.shtml
dgaynes
Meanwhile, will it hard to manage a Windows Form with both control and custom Paint event How can I position the controls properly in the designer
Thanks!
Regards,
Alex
rod_r
MtEvans
AlexKL
Not much else, I am afraid. Under this version of Windows Forms controls, when you have that many controls being displayed, you will definately notice a delay. Dealing with Window Messages and Paint events is just darn expensive (Reflector into the Control class to see just how much stuff is crammed in there!). Hence the popularity of "spash screens" over the years.
You might be able to find another trick or two.. nothing else comes to mind though (at least nothing that would be better than a shameful hack).
WPF might offer some relief, as I think it's content model doesnt typically lend to this kind of problem as quickly.