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

Cursor.Clip プロパティ

カーソルクリッピング四角形を表す境界取得または設定します

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

解説解説
使用例使用例

CurrentカーソルHandle からカーソル作成し、その位置クリッピング四角形変更するコード例次に示します結果としてカーソルコード実行時位置から上に 50 ピクセル、左に 50 ピクセルの場所に移動します。さらに、カーソルクリッピング四角形フォーム境界変更されます。既定では、これはユーザー画面全体です。この例では、Form、およびクリックされたときにこのコード呼び出す Button存在する必要があります

Private Sub MoveCursor()
   ' If the form's cursor is not the Default cursor,
   ' set the Current cursor, move the cursor's Position,
   ' and set its clipping rectangle to the form. 
   If Not Me.Cursor.Equals(Cursors.Default)
 Then
      Me.Cursor = New Cursor(Cursor.Current.Handle)
      Cursor.Position = New Point(Cursor.Position.X - 50, Cursor.Position.Y
 - 50)
      Cursor.Clip = New Rectangle(Me.Location,
 Me.Size)
   End If
End Sub
private void MoveCursor()
{
   // If the form's cursor is not the Default cursor,
   // set the Current cursor, move the cursor's Position,
   // and set its clipping rectangle to the form. 
   if(!this.Cursor.Equals(Cursors.Default))
   {
   this.Cursor = new Cursor(Cursor.Current.Handle);
   Cursor.Position = new Point(Cursor.Position.X - 50, Cursor.Position.Y
 - 50);
   Cursor.Clip = new Rectangle(this.Location,
 this.Size);
   }
}
void MoveCursor()
{
   
   // If the form's cursor is not the Default cursor,
   // set the Current cursor, move the cursor's Position,
   // and set its clipping rectangle to the form.
   if (  !this->Cursor->Equals( Cursors::Default
 ) )
   {
      this->Cursor = gcnew System::Windows::Forms::Cursor(
 ::Cursor::Current->Handle );
      ::Cursor::Position = Point(::Cursor::Position.X - 50,::Cursor::Position.Y -
 50);
      ::Cursor::Clip = Rectangle(this->Location,this->Size);
   }
}
private void MoveCursor()
{
    // If the form's cursor is not the Default cursor,
    // set the Current cursor, move the cursor's Position,
    // and set its clipping rectangle to the form. 
    if (!(this.get_Cursor().Equals(Cursors.get_Default())))
 {
        this.set_Cursor(new Cursor(get_Cursor().get_Current().
            get_Handle()));
        Cursor.set_Position(new Point(get_Cursor().get_Position().
            get_X() - 50, get_Cursor().get_Position().get_Y() - 50));
        get_Cursor().set_Clip(new Rectangle(this.get_Location(),
 
            this.get_Size()));
    }
} //MoveCursor
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「Cursor.Clip プロパティ」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS