I have been looking into coloring objects like ellipses with code such as
SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(0x78FF0000));
I’d like to play around further with this by entering FromArgb’s argument into a textbox on a form, then using the textbox to set the Brush’s color. How would I convert the textbox’s text into an argument usable by FromArgb?
You could shorten this of course.
Edit: Keep in mind if you type something bad this could throw an exception. There are “TryParse” variants to allow you to handle the situation to your liking. I won’t make a specific recommendation because it depends on the context and scenario.