ComponentTray.GetLocation(IComponent) 方法

定义

获取指定组件相对于组件托盘左上角的位置。

public:
 System::Drawing::Point GetLocation(System::ComponentModel::IComponent ^ receiver);
[System.ComponentModel.Browsable(false)]
public System.Drawing.Point GetLocation(System.ComponentModel.IComponent receiver);
[<System.ComponentModel.Browsable(false)>]
member this.GetLocation : System.ComponentModel.IComponent -> System.Drawing.Point
Public Function GetLocation (receiver As IComponent) As Point

参数

receiver
IComponent

IComponent 检索的位置。

返回

指示 Point 指定组件的坐标,如果无法在组件托盘中找到指定的组件,则为空 Point 。 空Point属性IsEmpty等于true且通常具有XY且每个属性都等于零的属性。

属性

注解

GetLocation 是添加到组件托盘中每个组件的位置扩展器属性的访问器方法。

适用于