WinForms: SuspendLayout on Application
-
Hi. I just found the wonderfull SuspendLayout Method on the WinForm class.:cool: I was wondering if there is a similar feature to susoend the layout for the whole Application in multible forms, without doing it on every single form? Something like Application.SuspendLayout();;) Any ideas or suggestions?
-
Hi. I just found the wonderfull SuspendLayout Method on the WinForm class.:cool: I was wondering if there is a similar feature to susoend the layout for the whole Application in multible forms, without doing it on every single form? Something like Application.SuspendLayout();;) Any ideas or suggestions?
No, and why would there be? The whole idea of object-oriented programming is that objects are responsible for themselves (encapsulation, data hiding, etc.). Each form initializes it's surface so you just need to suspend and resume the layout in each. An
Application
in Windows Forms really just represents the message pump that keeps the main window (Form
) alive and dispatches window messages to their respective windows.Microsoft MVP, Visual C# My Articles