![]() ![]() The Position property is identical to the Control.MousePosition property. Me.Cursor = New Cursor()Ĭursor.Position = New Point( - 50, - 50)Ĭursor.Clip = New Rectangle(Me.Location, Me.Size) ' and set its clipping rectangle to the form. ![]() The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Examples The following code example creates a cursor from the Currentcursor's Handle, changes its position and clipping rectangle. ' Set the Current cursor, move the cursor's Position, A Pointthat represents the cursor's position in screen coordinates. This.Cursor = new Cursor() Ĭursor.Position = new Point( - 50, - 50) Ĭursor.Clip = new Rectangle(this.Location, this.Size) ::Cursor::Clip = Rectangle(this->Location,this->Size) ::Cursor::Position = Point(::Cursor::Position.X - 50,::Cursor::Position.Y - 50) This->Cursor = gcnew System::Windows::Forms::Cursor( ::Cursor::Current->Handle ) and set its clipping rectangle to the form. Set the Current cursor, move the cursor's Position, This example requires a Form and a Button to call this code when it is clicked. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). ![]() The following code example creates a cursor from the Current cursor's Handle, changes its position and clipping rectangle. Static property System::Drawing::Point Position static member Position : with get, set Public Shared Property Position As Point Property Value PointĪ Point that represents the cursor's position in screen coordinates. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |