Forum Discussion
No RepliesBe the first to reply
Related Content
- 2 months ago
- 2 years ago
- 14 years ago
- 7 years ago
Recent Discussions
- 2 months ago
- 7 months ago
Hi,
How do I convert retrieved BackColor property to System.Drawing.Color?
This is the code I use to get the BackColor:
object backColorValue = textEdit.GetProperty<object>("BackColor");
But how do I convert it to type System.Drawing.Color? According to TestLeft Spy this is the class name of this property (ClrFullClassName)
Simple casting does not seem to work:
Color c = (Color) backColorValue;
Exception:
Additional information: Specified cast is not valid.