Form.DesktopLocation プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Form.DesktopLocation プロパティの意味・解説 

Form.DesktopLocation プロパティ

Windows デスクトップ上のフォーム位置取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Property DesktopLocation As
 Point
Dim instance As Form
Dim value As Point

value = instance.DesktopLocation

instance.DesktopLocation = value
public Point DesktopLocation { get; set;
 }
public:
property Point DesktopLocation {
    Point get ();
    void set (Point value);
}
/** @property */
public Point get_DesktopLocation ()

/** @property */
public void set_DesktopLocation (Point value)
public function get DesktopLocation
 () : Point

public function set DesktopLocation
 (value : Point)

プロパティ
デスクトップ上のフォーム位置を表す Point

解説解説
使用例使用例

デスクトップ左端から 100 ピクセル上端から 100 ピクセル位置フォーム配置されるように、フォーム位置設定するコード例次に示します。この例では、メソッドフォーム クラス内で定義されていることを前提にしています。

Public Sub MoveMyForm()
    ' Create a Point object that will be used as the location of the
 form.
    Dim tempPoint As New
 Point(100, 100)
    ' Set the location of the form using the Point object.
    DesktopLocation = tempPoint
End Sub 'MoveMyForm
public void MoveMyForm()
 {
    // Create a Point object that will be used as the location of the
 form.
    Point tempPoint = new Point(100,100);
    // Set the location of the form using the Point object.
    this.DesktopLocation = tempPoint;
 }
   
public:
   void MoveMyForm()
   {
      // Create a Point object that will be used as the location of the
 form.
      Point tempPoint = Point( 100, 100 );
      // Set the location of the form using the Point object.
      this->DesktopLocation = tempPoint;
   }
public void MoveMyForm()
{
    // Create a Point object that will be used as the location of 
    // the form.
    Point tempPoint = new Point(100, 100);

    // Set the location of the form using the Point object.
    this.set_DesktopLocation(tempPoint);
} //MoveMyForm
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Form.DesktopLocation プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Form.DesktopLocation プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS