Close is a Custom Button I made.
Dim CloseButton As New Close
Private Sub CloseButtonCode() Handles Me.Load
CloseButton.Anchor = AnchorStyles.Top And AnchorStyles.Right
CloseButton.Enabled = True
CloseButton.Location = New Point(1170, 0)
CloseButton.Size = New Size(30, 30)
CloseButton.Visible = True
Controls.Add(CloseButton)
AddHandler CloseButton.Click, AddressOf CloseButtonClick
End Sub
Whenever I Maximise, this button doesn't move to the top right corner like it's supposed to. Any help? Thanks in advance.