Hi All... I have several Radio Buttons on one form, and anytime one of them is checked it will assign the color to variable (radioBtnColor):
Usage in separate form:Code:Public Shared radioBtnColor As Color Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged radioBtnColor = Color.FromName("Magenta") End Sub Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged radioBtnColor = Color.FromName("AliceBlue") End Sub Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged radioBtnColor = Color.FromName("Chartreuse") End Sub
The text file output looks like this:Code:Dim myClickedColor As String myClickedColor = Form2.radioBtnColor.ToString ''Write to text file (myClickedColor)
How do I retrieve this data in order to create a button color later? Or am I capturing the color incorrectly?Code:JOB1,Color [AliceBlue],A123 JOB2,Color [Chartreuse],A123 JOB3,Color [DarkOrange],A123
So far what I have is not working and I cannot seem to write data like the actual color to easily assign it later to my buttons such as....
I hope this makes sense and I have explained properly what I am trying to do. ThanksCode:ButtonColor = Color.AliceBlue




Reply With Quote
