System.Windows.Forms.Design.ComponentTray.GetLocation Method

Gets the location of the specified component, relative to the upper-left corner of the component tray.

Syntax

[System.ComponentModel.Localizable(false)]
[System.ComponentModel.DesignOnly(true)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Category("Layout")]
[System.ComponentModel.Browsable(false)]
public System.Drawing.Point GetLocation (System.ComponentModel.IComponent receiver)

Parameters

receiver
The System.ComponentModel.IComponent to retrieve the location of.

Returns

A System.Drawing.Point indicating the coordinates of the specified component, or an empty System.Drawing.Point if the specified component could not be found in the component tray. An empty System.Drawing.Point has an System.Drawing.Point.IsEmpty property equal to true and typically has System.Drawing.Point.X and System.Drawing.Point.Y properties that are each equal to zero.

Remarks

ComponentTray.GetLocation(System.ComponentModel.IComponent) is an accessor method for the location extender property that is added to each component in the component tray.

Requirements

Namespace: System.Windows.Forms.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0