Pick a color with ColorDialog
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| C# Code Snippets |
| See also |
| edit |
This C# code snippet displays the ColorDialog dialog box in order to select a color.
using System.Windows.Forms; ... ColorDialog colorDialog = new ColorDialog(); if ( colorDialog.ShowDialog() != DialogResult.Cancel ) { textBox.ForeColor = colorDialog.Color; }