P
p19010101
I'm working on a single form app, the form contains a tab control with
multiple pages. As a result the code gets very long in the code page,
which can be a pain to maintain, basically it's a mess.
What I'm planning to do is to break down the codes into separate
modules, i.e. one module per tab page, and pass the controls to the
module's subroutines as parameters. It should work but I think it's
wrong, or at least not the .net way of doing things.
Perhaps I should make each tab page as a class, then attach them to the
tab control. But I have little idea how to do that. Do I create user
controls then drop them into the tab pages, or should I derive my own
class from System.Windows.Forms.TabPage?
Please help, simple code snippets would be appreciated. TIA.
multiple pages. As a result the code gets very long in the code page,
which can be a pain to maintain, basically it's a mess.
What I'm planning to do is to break down the codes into separate
modules, i.e. one module per tab page, and pass the controls to the
module's subroutines as parameters. It should work but I think it's
wrong, or at least not the .net way of doing things.
Perhaps I should make each tab page as a class, then attach them to the
tab control. But I have little idea how to do that. Do I create user
controls then drop them into the tab pages, or should I derive my own
class from System.Windows.Forms.TabPage?
Please help, simple code snippets would be appreciated. TIA.