how to get & display colordialogs color value

aniskhan

Well-known member
Joined
Oct 24, 2005
Messages
90
Location
D.I.Khan
Programming Experience
1-3
I have a color dialogBox
VB.NET:
dim strcolor as color

If ColorDialog1.ShowDialog = DialogResult.OK Then
            str1 = ColorDialog1.Color
            TextBox3.Text = Str(str1)
End If
here i want display the color value #FFFFFF in the textbox how??
 
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] strHex [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2] = ""
[/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ColorDialog1.ShowDialog()
strHex += Hex(ColorDialog1.Color.R.ToString).PadLeft(2, "0")
strHex += Hex(ColorDialog1.Color.G.ToString).PadLeft(2, "0")
strHex += Hex(ColorDialog1.Color.B.ToString).PadLeft(2, "0")
[/SIZE]
 
Back
Top