|
-
Nov 17th, 2009, 12:48 AM
#21
Thread Starter
New Member
Re: VB Radio button code help
got it. moms kicking me off the computer and I need to go to bed. I will start over in the am. So heres a couple of questions;
in the picturebox, are there supposed to be any specially assigned settings or pics?
I noticed a visible tab, is that supposed to be true or false?
here is my whole stupid assignment codes. if you guys have the time, maybe you can find my stupid mistakes.
thank you for you patience and help.
Public Class SendAMessageToAFriendByEddieCulver16Nov09
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'end the application by closing the window
Me.Close()
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkFriendA.CheckedChanged
txtFriendA.Text = txtMessage.Text
chkFriendA.Enabled = False
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkFriendB.CheckedChanged
txtFriendB.Text = txtMessage.Text
chkFriendB.Enabled = False
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkFriendC.CheckedChanged
txtFriendC.Text = txtMessage.Text
chkFriendC.Enabled = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Clear the input and output text boxes
txtMessage.Text = ""
txtFriendA.Text = "" 'not necessary, see comments below
txtFriendB.Text = ""
txtFriendC.Text = ""
'Set back color to white
radwhte.Checked = True 'sets BackColor to white for all output text boxes
'Reset and enable the "send to" check boxes
chkFriendA.Checked = False
chkFriendB.Checked = False
chkFriendC.Checked = False
chkFriendA.Enabled = True
chkFriendB.Enabled = True
chkFriendC.Enabled = True
'Set focus
txtMessage.Focus() 'puts the focus on the txtMessage text box
End Sub
Private Sub RadGreen_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadGreen.CheckedChanged
txtFriendA.BackColor = Color.Green
txtFriendB.BackColor = Color.Green
txtFriendC.BackColor = Color.Green
End Sub
Private Sub RadRed_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadRed.CheckedChanged
txtFriendA.BackColor = Color.Red
txtFriendB.BackColor = Color.Red
txtFriendC.BackColor = Color.Red
End Sub
Private Sub radwhte_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radwhte.CheckedChanged
txtFriendA.BackColor = Color.White
txtFriendB.BackColor = Color.White
txtFriendC.BackColor = Color.White
End Sub
Private Sub RadButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.CheckedChanged
If Me.RadButton1.Checked Then PictureBox1.Image = My.Resources.happy1
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If Me.RadioButton2.Checked Then PictureBox1.Image = My.Resources.unhappy
End Sub
End Class
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|