Hello,
I am build a windows form application for barcode generation. How can I change barcode forecolor? I have button for selecting color.
click the button name is "btnforcolor" then show color dialoguebox. Then select forecolor for my radBarcode component. Please help me.
My code given below
private void btnForeColor_Click(object sender, EventArgs e)
{
using (ColorDialog cdialog1 = new ColorDialog())
{
cdialog1.AnyColor = true;
if (cdialog1.ShowDialog() == DialogResult.OK)
{
radBarcode1.ForeColor = cdialog1.Color;
this.btnForeColor.BackColor = cdialog1.Color;
}
}
}
and Page Loading
private void SecondCustomControle_Load(object sender, EventArgs e)
{
this.btnForeColor.BackColor = radBarcode1.ForeColor;
this.btnBackColor.BackColor = radBarcode1.BackColor;
}
but this is not working. Please Help me.Thanks In advance.