On Jun 26, 10:12 pm, "Jeff Ciaccio" <non...@noreply.orgwrote:
Hey Andrew,
I just want to allow the user to toggle the sound on and off.
If you can tell me what you are
attempt to accomplish with the code, I'd be very willing to attempt to
help you more.
Andrew Cooper
You can use a checkbox to do it even with its text:
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
' Turn on sound - code here
' Also,
CheckBox1.Text = "Sound: ON"
ElseIf CheckBox1.Checked = False Then
'Turn off sound
' Also,
CheckBox1.Text = "Sound: OFF"
End If
End Sub
And still if you want to use radio buttons, then you'd need 2 radio
buttons like named "radiobutton1" and "radiobutton2" :
Private Sub RadioButton1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
'Turn on Sound - Code here
MsgBox("Sound is turned ON")
End If
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
' Turn off Sound - Code here
MsgBox("Sound is turned OFF")
End If
End Sub
Hope this helps,
Onur Güzel