void ColorDialogButtonClick(object sender, EventArgs e) { ArgbColorDialog dialog = new ArgbColorDialog(); dialog.Color = Color.SkyBlue; if (dialog.ShowDialog() != DialogResult.OK) return; }
private Color openColorDialog(Color currentColor) { ArgbColorDialog dialog = new ArgbColorDialog(); // Sets the initial color select to the current text color. dialog.Color = currentColor; dialog.ShowDialog(); // Update the text box color return dialog.Color; }