Public Class Form1 Dim argb As String Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Me.ColorDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then argb = Me.ColorDialog1.Color.ToArgb().ToString() End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.BackColor = Color.FromArgb(Integer.Parse(argb)) End Sub End Class