title: VB 2010 save and load Color Dialog
body: <p>I am working on a program that contains saved user preferences. I the program a user can set a color and it will be saved to use again. However, try as I might their is no way after hours of work that I've found to save a System.Drawing.Event ARGB to a string of Integer to save as a file.</p>
  
  <p>The code below shows my most successful attempt I can get the hex conversion to work but cannot succeed in returning it to ARGB </p>
  
  <pre><code>    Dim color As New ColorDialog
      Dim userpref As String = ColorTranslator.ToHtml(color.Color)
      Dim readcolor As Color = ColorTranslator.FromHtml(userpref)
      If (color.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then
          Button1.BackColor = Drawing.Color.FromArgb(readcolor)
      End If
  </code></pre>
  
  <p>When trying to convert to Strings or Integers usually I just get random numbers that aren't what I want or Color [Black] for every color please help!</p>