Question : Group boxes on form -vb.net 2008 forms app

I have to group boxes on a form that overlap.  If one condition is true (option box is selected) then one group box should show if the other option box is selected the other one should show. The problem is only one is showing.  If I move the group box so that they do not overlap then they both work.

What is the problem

Answer : Group boxes on form -vb.net 2008 forms app

Are they perhaps included in some other container as well.  The included snipet works for me in VS2008
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        GroupBox1.Visible = True
        GroupBox2.Visible = False
    End Sub

    Private Sub RadioButtonBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButtonBox1.CheckedChanged
        If RadioButtonBox1.Checked = True Then
            GroupBox1.Visible = True
            GroupBox2.Visible = False
        Else
            GroupBox1.Visible = False
            GroupBox2.Visible = True
        End If
    End Sub

    Private Sub RadioButtonBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButtonBox2.CheckedChanged
        If RadioButtonBox1.Checked = True Then
            GroupBox1.Visible = True
            GroupBox2.Visible = False
        Else
            GroupBox1.Visible = False
            GroupBox2.Visible = True
        End If
    End Sub
End Class
Random Solutions  
 
programming4us programming4us