Support Forums
[Help] Vb 2008 CheckBoxes - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [Help] Vb 2008 CheckBoxes (/showthread.php?tid=3520)

Pages: 1 2


RE: [Help] Vb 2008 CheckBoxes - Cida - 12-29-2009

(12-11-2009, 11:59 AM)dunlop03 Wrote: That wont work , trust me you need to code the check boxes like this :

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

    Private Sub CheckBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.Click
        If CheckBox2.Checked = True Then
            CheckBox1.Checked = False
            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 CheckBox3.Checked = True Then
            CheckBox1.Checked = False
            CheckBox2.Checked = False
        End If
    End Sub
[/quote]

Hmm, couple of weeks ago I spent ages trying to figure out why the radio buttons on my program didn't function properly (It was a calculator, I'm new to VB), then I decided to try them in different Subs lol


RE: [Help] Vb 2008 CheckBoxes - RaZoR03 - 04-18-2010

(12-11-2009, 09:10 AM)dunlop03 Wrote: Just use this :
Just use this (radiobuttons) :

Code:
If RadioButton1.Checked = True Then
            RadioButton2.Checked = False
            RadioButton3.Checked = False
        ElseIf RadioButton2.Checked = True Then
            RadioButton1.Checked = False
            RadioButton3.Checked = False
        ElseIf RadioButton3.Checked = True Then
            RadioButton1.Checked = False
            RadioButton2.Checked = False
        End If

Yeye
[/quote]

Thanks.