Public Class AnchorTest
    Private Sub chkResizable_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkResizable.CheckedChanged

        ' To combine more than one enumerated value, you need to use Or, not And.
        If chkResizable.Checked = True Then
            Button1.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
            GroupBox1.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
        Else
            Button1.Anchor = AnchorStyles.Top Or AnchorStyles.Left
            GroupBox1.Anchor = AnchorStyles.Top Or AnchorStyles.Left
        End If

        Button2.Anchor = Button1.Anchor

    End Sub
End Class