Results 1 to 7 of 7
  1. #1
    CoOKiEbrEEd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    USA
    Posts
    149
    Reputation
    10
    Thanks
    13
    My Mood
    Bored

    [Help] Check Box

    I'm making a Multi-Tool and I need some help on crosshair.

    I have

    If Checkbox1.checked Then
    crosshair1.show()
    crosshair2.hide()
    crosshair3.hide()
    crosshair4.hide()
    else
    Crosshair1.hide()
    crosshair2.hide()
    crosshair3.hide()
    crosshair4.hide()


    But when I check checkbox2, checkbox1 is still checked.

    Any way I can make it to where only 1 check box can be checked at a time?

  2. #2
    VernK's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    49
    Reputation
    10
    Thanks
    47
    My Mood
    Relaxed
    Yeah um use a RadioButton lol
    I am Here to Program!
    __________________________________________________
    Open Source Project: [Advanced IP Tool][Released]
    Open Source Project: [Advanced IP Tracker][Released]
    Download the project here! - IP Tool v1.5 By VernK - Full Source
    __________________________________________________
    Visual Basic: 67%
    Visual C#: 23%
    Visual Web Dev: 10%
    Visual C++: 5%


    Feel free to ask me any questions or get help:
    Skype: veeran.kerai. rocks (Active) <remove space>
    AIM: veerank12@aol.com
    YAHOO: veerank12@yahoo.com
    MSN: veerank12@live.com (Very Active)
    GMAIL: movemanb@gmail.com
    E-MAILS: veerank12@mail.com
    veerank12@gm*****m
    Or PM Me on MPGH!

  3. #3
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    Quote Originally Posted by VernK View Post
    Yeah um use a RadioButton lol
    That or do this:

    Code:
    If Checkbox1.checked Then 
    Checkbox2.Checked = False
    crosshair1.show()
    crosshair2.hide()
    crosshair3.hide()
    crosshair4.hide()
    else
    Checkbox1.Checked = True ' LOL
    Crosshair1.hide()
    crosshair2.hide()
    crosshair3.hide()
    crosshair4.hide()
    
    End if

  4. #4
    CoOKiEbrEEd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    USA
    Posts
    149
    Reputation
    10
    Thanks
    13
    My Mood
    Bored
    Quote Originally Posted by -Away View Post


    That or do this:

    Code:
    If Checkbox1.checked Then 
    Checkbox2.Checked = False
    crosshair1.show()
    crosshair2.hide()
    crosshair3.hide()
    crosshair4.hide()
    else
    Checkbox1.Checked = True ' LOL
    Crosshair1.hide()
    crosshair2.hide()
    crosshair3.hide()
    crosshair4.hide()
    
    End if
    I'll try this after I wake up a bit

  5. #5
    CoOKiEbrEEd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    USA
    Posts
    149
    Reputation
    10
    Thanks
    13
    My Mood
    Bored
    If CheckBox1.Checked Then
    CheckBox1.Checked = True
    CheckBox2.Checked = False
    CheckBox3.Checked = False
    CheckBox4.Checked = False
    Crosshair1.Show()
    Crosshair2.Hide()
    Crosshair3.Hide()
    Crosshair4.Hide()
    Else
    Crosshair1.Hide()
    Crosshair2.Hide()
    Crosshair3.Hide()
    Crosshair4.Hide()
    End If

    Will that work for crosshair1 checkbox

  6. #6
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Rotfl ever heard of loops?

    Foreach the controls in that group of checkbox's. Check which one has the property <Checked> to true, break the loop. And there you go, show the crosshair.

  7. #7
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    Or JUST use Radio Buttons! OMG