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。 空的 PointIsEmpty 屬性等於 true,通常 XY 屬性都等於零。

屬性

備註

GetLocation 是位置擴充器屬性的存取子方法,會新增至元件匣中的每個元件。

適用於