Color Dialog

Using color dialog to select color and get rgb values
place a color dialog on to the form

If dlgcolor.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBoxcolor.BackColor = dlgcolor.Color
sbred.Value = dlgcolor.Color.R.ToString
sbgreen.Value = dlgcolor.Color.G.ToString
sbblue.Value = dlgcolor.Color.B.ToString
txtred.Text = dlgcolor.Color.R.ToString
txtgreen.Text = dlgcolor.Color.G.ToString
txtblue.Text = dlgcolor.Color.B.ToString

End If


Author: srinivasa reddy tatikonda09 Jan 2009 Member Level: Silver   Points : 2

Private Sub btnPickColor_Click(ByVal sender As _
System.Object, _
ByVal e As System.EventArgs) Handles btnPickColor.Click
dlgColor.Color = Me.BackColor
If dlgColor.ShowDialog() = DialogResult.OK Then
btnPickColor.BackColor = dlgColor.Color
Me.BackColor = dlgColor.Color
End If
End Sub
Best Regards

Srinivasa Reddy