开发者

Are controls components?

开发者 https://www.devze.com 2023-02-07 17:35 出处:网络
Just terminology question. Some articles mention that things like But开发者_运维问答ton, Panel, SplitPanel, etc. are controls. Some called components. Is Both correct?I think you\'re talking not about

Just terminology question. Some articles mention that things like But开发者_运维问答ton, Panel, SplitPanel, etc. are controls. Some called components. Is Both correct?


I think you're talking not about Visual Studio, but .NET.

System.Windows.Forms.Control class signature:

public class Control : Component, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable

System.ComponentModel.Component class signature:

public class Component : MarshalByRefObject, IComponent, IDisposable

Thus, a Control is a Component.


The Control is a Visual Component. every control is a component but not all the components are controls.


Controls are one kind of component.

Class libraries are also considered components.

A component is a set of (normally related) classes distributed in one package (i.e. a dll).


A control is a component; but a component is not necessarily a control.


Well,visually speaking usually components are a subset of controls. Just check the tools tab and you will see one section called components.

They are controls that have not a direct visual representation at the form like an ErrorProvider, an ImageList, a Timer, etc ...

Are controls components?

0

精彩评论

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

关注公众号