Cursor.Equals(Object) 메서드

정의

이 커서가 지정된 Cursor커서와 같은지 여부를 나타내는 값을 반환합니다.

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals(object obj);
public override bool Equals(object? obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

매개 변수

obj
Object

비교할 Cursor입니다.

반품

이 커서가 지정된 커서와 같으면 그렇지 않으면 .

예제

다음 코드 예제에서는 커서Current에서 커서를 Handle 만들고 위치를 변경하고 사각형을 클리핑합니다. 그 결과 코드가 실행될 때 커서가 왼쪽 50픽셀 위로 이동합니다. 또한 커서의 클리핑 사각형은 양식의 범위로 변경됩니다(기본적으로 사용자의 전체 화면임). 이 예제에서는 Form 클릭할 때 a와 a Button 가 이 코드를 호출해야 합니다.

void MoveCursor()
{
   // Set the Current cursor, move the cursor's Position,
   // and set its clipping rectangle to the form.

   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()
{
   // Set the Current cursor, move the cursor's Position,
   // and set its clipping rectangle to the form. 

   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);
}
Private Sub MoveCursor()
   ' Set the Current cursor, move the cursor's Position,
   ' and set its clipping rectangle to the form. 

   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 Sub

적용 대상