radio Button Help

RonMex

Member
Joined
Apr 9, 2011
Messages
10
Programming Experience
3-5
i am having a problem with a calculator that i am making. i am using radio buttons as selectors for the operations (+-*/). i have two inputboxes. i want to do some error checking. for example if the user want to find the mod of a number, i want them to only use inputbox1 to enter the value.
here is my code:
Private Sub ModButton_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PIButton.CheckedChanged
Var2.BackColor = Color.Red 'inputbox2
Var2.ReadOnly = True
End Sub

the problem is that when other radio buttons are clicked the effect doesn't change. how can i fix it so that other radio buttons don't have the same action

i am using visual studios 2008 professional
 
Private Sub ModButton_CheckedChanged(ByVal...)
If ModButton.Checked Then
Var2.BackColor = Color.Red 'inputbox2
Var2.ReadOnly = True
Else
Var2.BackColor = SystemColors.Control 'inputbox2
Var2.ReadOnly = False
End If
End Sub
 
Back
Top