How can I convert a string like 'Color [A=255, R=207, G=219, B=235]' into a
System.Drawing.Color object? I'm trying to allow the user to set their
background colour by writing to and reading from the registry.

    key.SetValue('Background', TObject(col))

(where col is the colour the user has chosen from the ColorDialog) writes
the value in the above-mentioned form to the registry.

    key.GetValue('Background', &Object(System.Drawing.Color.LightSteelBlue)

reads it back but I then cannot apply it to my components -

    System.Drawing.Color(key.GetValue('Background',

      &Object(System.Drawing.Color.LightSteelBlue)))

results in "Specified cast is not valid" 

 

So what's the correct way to do this?

 

TIA.

 

Brigitte

 



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to