ComponentTray.CanDisplayComponent 方法
获取一个值,该值指示是否可显示指定的组件。
**命名空间:**System.Windows.Forms.Design
**程序集:**System.Design(在 system.design.dll 中)
语法
声明
Protected Overridable Function CanDisplayComponent ( _
component As IComponent _
) As Boolean
用法
Dim component As IComponent
Dim returnValue As Boolean
returnValue = Me.CanDisplayComponent(component)
protected virtual bool CanDisplayComponent (
IComponent component
)
protected:
virtual bool CanDisplayComponent (
IComponent^ component
)
protected boolean CanDisplayComponent (
IComponent component
)
protected function CanDisplayComponent (
component : IComponent
) : boolean
参数
- component
要测试的 IComponent。
返回值
如果可以显示该组件,则为 true;否则为 false。
备注
此方法测试指定的组件是否存在 DesignTimeVisibleAttribute,该属性指示组件是否具有可显示的用户界面。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见。
平台
Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0
请参见
参考
ComponentTray 类
ComponentTray 成员
System.Windows.Forms.Design 命名空间