I have a button with background color and the user can change the color by clicking on the button.
I want to add the color to the CustomColor property but I don't know how to convert Color to Int.
Add my code, the unknow part is the code in the comment:
//colorDialog.CustomColors = new int[] { buRect_FormBackColor.BackColor.ToArgb() };
colorDialog.Color = buRect_FormBackColor.BackColor;
if (colorDialog.ShowDialog() != DialogResult.Cancel)
{
style.FormBackColor = colorDialog.Color;
buRect_FormBackColor.BackColor = style.FormBackColor;
}Thank you