Results 1 to 2 of 2

Thread: Saving Color Info In Registry

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Location
    UK
    Posts
    8

    Question Saving Color Info In Registry

    Hi!

    Can anyone tell me how I can save a color to the registry & read it back?

    ----------------------------------------------------------------------------------

    Dim m_Normal_BG As Color
    Dim aa As String

    In Button Click Event:

    ColorDialog1.ShowDialog()
    m_Normal_BG = ColorDialog1.Color
    TextBox1.BackColor = m_Normal_BG

    SaveSetting("Test App", "Colors", "Normal_BG", m_Normal_BG.ToArgb)

    Retrieving info (code behind second button):

    aa = GetSetting("Test App", "Colors", "Normal_BG")
    m_Normal_BG = Color.FromArgb(aa)
    TextBox1.BackColor = m_Normal_BG

    ---------------------------------------------------------------------------------

    The above works fine, but I want it to save in the registry as Color.Blue & retrieve the value as Color.Blue, which the above doesn't do.

    Any suggestions?

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    I think this thread should help.
    This world is not my home. I'm just passing through.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width