ComponentTray.GetLocation(IComponent) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定元件相對於元件匣左上角的位置。
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
,通常 X 和 Y 屬性都等於零。
- 屬性
備註
GetLocation 是位置擴充器屬性的存取子方法,會新增至元件匣中的每個元件。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應