I’m currently developing an Windows Forms application in C# which will make use of tabs for the GUI. The problem I’m facing though is that the code is becoming untidy.
The reason is that the code for GUI components (such as button clicks) resides on the main form code.
So I’m looking for a way to still handle all the GUI interactions the same way but separate the code in a logical way (e.g. different files). Like having button1_click() reside in another file but work the same way as before.
Thanks 🙂
I’m currently developing an Windows Forms application in C# which will make use of
Share
You can place each “Tab” into its own
UserControl, and handle the events there instead of all within the main form.As tabs typically each represent something “distinct”, this is often fairly simple to implement, and helps clean up your code.