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 取得的位置。

傳回

A Point 表示指定元件的座標,或 empty Point 表示元件托盤中找不到該元件。 空 Point 的性質等 IsEmpty 於 , true 通常具有 XY ,且 性質各等於零。

屬性

備註

GetLocation 是用於附加於元件托盤中每個元件的 location extender 屬性的存取器方法。

適用於