Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        'stanga
        If CheckBox1.Checked = True Then
            If Label1.Left - 10 >= 0 Then
                Label1.Left = Label1.Left - 10
            End If
        End If

        'sus
        If CheckBox2.Checked = True Then
            If Label1.Top - 10 >= 0 Then
                Label1.Top = Label1.Top - 10
            End If
        End If

        'dreapta
        If CheckBox3.Checked = True Then
            If Label1.Left + Label1.Width + 10 <= Me.Width Then
                Label1.Left = Label1.Left + 10
            End If
        End If

        'jos
        If CheckBox4.Checked = True Then
            If Label1.Top + Label1.Height + 10 <= Me.Height - (Me.Height - Me.ClientSize.Height) Then
                Label1.Top = Label1.Top + 10
            End If
        End If
    End Sub

    Private Sub CheckBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.Click
        If CheckBox3.Checked = True Then
            CheckBox3.Checked = False
        End If
    End Sub

    Private Sub CheckBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.Click
        If CheckBox1.Checked = True Then
            CheckBox1.Checked = False
        End If

    End Sub

    Private Sub CheckBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.Click
        If CheckBox4.Checked = True Then
            CheckBox4.Checked = False
        End If
    End Sub

    Private Sub CheckBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.Click
        If CheckBox2.Checked = True Then
            CheckBox2.Checked = False
        End If
    End Sub
End Class
