I require some help.
I want to resize my form from the Corner (Right corner) in the boderless form.
I know the coding as for resize it with the four different direction but unknown with the Corners.
Codes I used to resize the Form from four different direction (up,down,right,left):
Private Sub UpR_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles UpR.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Me.Size = New Size(Me.Size.Width, Me.Size.Height + (Me.Location.Y - MousePosition.Y))
Me.Location = New Point(Me.Location.X, MousePosition.Y)
End If
End Sub
Private Sub DownR_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DownR.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Me.Size = New Size(Me.Size.Width, MousePosition.Y - Me.Location.Y)
End If
End Sub
Private Sub LeftR_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles LeftR.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Me.Size = New Size(Me.Size.Width + (Me.Location.X - MousePosition.X), Me.Size.Height)
Me.Location = New Point(MousePosition.X, Me.Location.Y)
End If
End Sub
Private Sub RightR_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RightR.MouseMove
If e.Button = Windows.Forms.MouseButtons.Left Then
Me.Size = New Size(MousePosition.X - Me.Location.X, Me.Size.Height)
End If
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
DownR.Location = New Point(0, Me.Size.Height - 2)
RightR.Location = New Point(Me.Size.Width - 2, 0)
UpR.Size = New Size(Me.Size.Width, 2)
DownR.Size = New Size(Me.Size.Width, 2)
LeftR.Size = New Size(2, Me.Size.Height)
RightR.Size = New Size(2, Me.Size.Height)
End Sub
IS THERE SOMTHING THAT I HAVE TO DO?
I USED PICTURE BOX. for this....
PLEASE HELP ME WITH THE CORNER.