Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deriving from a Form class in .NET

Theoretically you can derive from a Form, but is it something you should not do? I intuitively think so, but I've never heard of any rule like this.

I mean some conrete class that already derives from Form. For example, if I've got class MyForm : Form, the question is: can I derive from MyForm?

like image 808
agnieszka Avatar asked Mar 06 '26 09:03

agnieszka


1 Answers

You should derive from Form when creating a new Windows Form. When creating a new form in Visual Studio, the source files you get already derive from Form.

like image 193
Arjan Einbu Avatar answered Mar 08 '26 22:03

Arjan Einbu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!