|
-
May 23rd, 2006, 09:24 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] converting string to color
Hi,
It is posible to convert string to System.drawing.Color
ex.
"Red" = converto System.drawing.Color
Thanks,
Popskie
-
May 23rd, 2006, 09:44 PM
#2
Re: converting string to color
I've said it before (a large number of times) and I'll say it again: read the documentation for the type and its member listing first. Had you done that you would have seen the FromName method straight off. If I can find it, which I just did by following my own advice, then you can too.
-
May 23rd, 2006, 09:50 PM
#3
Thread Starter
Fanatic Member
Re: [RESOLVED] converting string to color
Sory JM I dont have any rosources even msdn. thanks
I just keep on surfing on the web but not lucky.
-
May 23rd, 2006, 10:38 PM
#4
Re: [RESOLVED] converting string to color
If you have access to this forum then you have access to the online MSDN library. The link below is the result of a search for "color members", which is how you should search for the member listing for a class or structure. The first two results are for the type overview and member listing from the .NET 1.1 documentation and the next two are the same topics from the .NET 2.0 documentation. You would follow the link to the member listing for the appropriate version and just look down the list of members to see if the name and description of one jumps out as useful. The FromName method is described thusly:
Creates a Color structure from the specified name of a pre-defined color.
That sounds useful so you'd follow the link to the more detailed topic about that method, where you'll often get a code sample too.
http://search.msdn.microsoft.com/sea...=color+members
-
May 24th, 2006, 02:28 AM
#5
Thread Starter
Fanatic Member
Re: [RESOLVED] converting string to color
thanks for the link jm. its very useful to me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|