Hi Folks,
All im trying to do is change the back color of a label to the color chosen from a color dialog, i have the label changing color, but i want it to store the color until the user decides to change again, at present when i reload the form the color defaults to its original value. this might be a simple question but im new to vb.net and need all the help i can get.
Here is what i have so far:
PublicClass Coloroptions
PrivateSub changeColorButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles changecolorbutton.Click
If ColorDialog1.ShowDialog() = DialogResult.OK Then
lblCustomer.BackColor = ColorDialog1.Color
EndIf
EndSub
PublicProperty FavoriteColor() As Color
Get
Return colorDialog1.Color
EndGet
Set(ByVal Value As Color)
lblCustomer.BackColor = Value
ColorDialog1.Color = Value
EndSet
EndProperty
EndClass
Thanks for the help
All im trying to do is change the back color of a label to the color chosen from a color dialog, i have the label changing color, but i want it to store the color until the user decides to change again, at present when i reload the form the color defaults to its original value. this might be a simple question but im new to vb.net and need all the help i can get.
Here is what i have so far:
PublicClass Coloroptions
PrivateSub changeColorButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles changecolorbutton.Click
If ColorDialog1.ShowDialog() = DialogResult.OK Then
lblCustomer.BackColor = ColorDialog1.Color
EndIf
EndSub
PublicProperty FavoriteColor() As Color
Get
Return colorDialog1.Color
EndGet
Set(ByVal Value As Color)
lblCustomer.BackColor = Value
ColorDialog1.Color = Value
EndSet
EndProperty
EndClass
Thanks for the help