次の方法で共有


ComponentTray.GetLocation メソッド

コンポーネント トレイの左上隅に対して相対的に、指定したコンポーネントの位置を取得します。

Public Function GetLocation( _
   ByVal receiver As IComponent _) As Point
[C#]
public Point GetLocation(IComponentreceiver);
[C++]
public: Point GetLocation(IComponent* receiver);
[JScript]
public function GetLocation(
   receiver : IComponent) : Point;

パラメータ

  • receiver
    位置を取得する対象の IComponent

戻り値

指定したコンポーネントの座標を示す Point 。または、指定したコンポーネントがコンポーネント トレイで見つからない場合は空の Point 。空の PointIsEmpty プロパティは true に等しく、通常、 X プロパティおよび Y プロパティはそれぞれ 0 です。

解説

GetLocation は、コンポーネント トレイの各コンポーネントに追加される位置エクステンダ プロパティで使用するアクセサ メソッドです。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

ComponentTray クラス | ComponentTray メンバ | System.Windows.Forms.Design 名前空間