开发者

What is the base class form Windows Form?

开发者 https://www.devze.com 2023-02-18 06:21 出处:网络
If I create a new WinForms application, I can see that that Form1开发者_高级运维 inherits from Form. I thought that Form is a control. MSDN says that all controls inherit from UserControl class. Also

If I create a new WinForms application, I can see that that Form1开发者_高级运维 inherits from Form. I thought that Form is a control. MSDN says that all controls inherit from UserControl class. Also how it is? EDIT: Also do all Forms inherit from base Form class?


Form and UserControl both derive separately from ContainerControl, which derives from ScrollableControl, which derives from Control.


By Definition: Form acts like a container for controls.

In Windows Forms, a form is a visual surface on which you display information to the user. You ordinarily build Windows Forms applications by adding controls to forms and developing responses to user actions, such as mouse clicks or key presses.

A control is a discrete user interface (UI) element that displays data or accepts data input.


A Form isn't a control, it's a Window or Dialog box (as per the documentation).

0

精彩评论

暂无评论...
验证码 换一张
取 消