Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 10-13-2004, 10:42 PM   #1 (permalink)
sureshkumar_kc
Registered User
 
sureshkumar_kc's Avatar
 
Join Date: Sep 2004
Posts: 12
sureshkumar_kc is on a distinguished road
String to Color

Color nn=new Color();
string ss;
ss="Red"

--------
nn=(color)ss.ToString();
-------------
I want convert string to color i.e i am storing red color in string
so I want assign that value in nn
sureshkumar_kc is offline   Reply With Quote
Old 10-15-2004, 01:46 AM   #2 (permalink)
RobertStout
Registered User
 
RobertStout's Avatar
 
Join Date: Oct 2004
Location: Dank cellar
Posts: 18
RobertStout is on a distinguished road
See my reply here..
Click Here
RobertStout is offline   Reply With Quote
Old 03-06-2005, 09:53 PM   #3 (permalink)
dhar4dotnet
Registered User
 
Join Date: Mar 2005
Posts: 1
dhar4dotnet is on a distinguished road
Thumbs up (Color) str.ToString() doesn't Work for converting Color into String

Hii,

(Color) str.ToString() doesn't Work for converting Color into String.

Instead,

string strColor = SystemColors.Window;
Color tmpForeColor = Color.FromName(strColor);
button1.ForeColor = tmpForeColor;

This Works fine.
dhar4dotnet is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for another program Androto Standard C, C++ 54 10-15-2004 07:21 AM
sorting objects arrays by object properties sde Java 28 08-05-2004 05:51 AM
From C to Java HighterDK Java 11 07-13-2004 07:15 PM


All times are GMT -8. The time now is 10:59 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting