Saturn
Member
- Joined
- Jul 30, 2023
- Messages
- 8
- Programming Experience
- 1-3
So I've been working with forms for a while and I've been wondering, just to be on the safe side here... is it normal to just shove everything that needs to be displayed into the constructor?? I don't use the designer. Before I would build all my controls right inside the constructor but then as form needed to get bigger and bigger so did the constructor, so I instead moved all my control codes to seperate methods and just call them from the constructor. Still basically the same thing, just neater..
Example:
Example:
C#:
public Form1()
{
// Code for the form itself goes here, like ClientSize, etc.
CreateMenuStrip();
CreateComboBoxes();
CreateSomeOtherControl();
}