And what doesn't work? I mean, I know the answer but really...you need to
get into the habit of reading and understanding the compiler errors. You
also need to post specific error messages when asking questions about
them, not just write "but doesn't work".
As for this specific problem, look more closely at Morten's code. Copy
and paste it into your application if you have to. There's a very
specific difference between what he wrote, and what you managed to type in
to your own code. It's a critical difference, and I'm sure the compiler
is doing a decent job explaining it to you.
ToArgb() is not a static method so you can't use Color.ToArgb(), nor does it take a parameter so Color.ToArgb(kl) is wrong in two ways. You need to call ToArgb() on an instance of Color, and since kl is such an instance try kl.ToArgb()
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.