Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Help] Vb 2008 CheckBoxes
#11
(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
Reply
#12
(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.
[Image: 20r9vh4.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  VB 2008 - Useful Code Apache 36 16,043 11-25-2012, 10:37 PM
Last Post: ƃu∀ ıʞƃu∀
  [Pandora Incorporated] Visual Basic 2008 - Source Code Grabber [VIDEO TUTORIAL] Marik™ 13 4,677 05-23-2011, 06:41 PM
Last Post: KoBE
  [Pandora Incorporated]Visual Basic 2008 -MD5 Encryptor [VIDEO TUTORIAL] Marik™ 2 1,661 05-13-2011, 11:06 AM
Last Post: Imports System.Net
  [Pandora Incorporated] Visual Basic 2008 - Text To Speech [VIDEO TUTORIAL] Marik™ 1 1,576 04-14-2011, 05:37 PM
Last Post: Emily
  [Help] [VB.NET 2008] Textbox Contents Encryption. Example 4 4,003 02-23-2011, 01:16 AM
Last Post: Example

Forum Jump:


Users browsing this thread: 3 Guest(s)