Sunday, March 9, 2008

Color Selection Dialog in VB.NET

The Color Selection Dialog for VB.NET (and C# would be similar) is fairly easy to do if you have and example:


Dim colorValue As Color = Color.Red

Dim dlg As New ColorDialog

dlg.Color = colorValue

If dlg.ShowDialog() = DialogResult.OK Then
colorValue = dlg.Color
End If

For VB6, here is one way to do it:

No comments: