I have this C# code:
public partial class Continue : Form
{
public Continue(string colourName)
{
InitializeComponent();
lblMessage.Text = String.Format("Do you wish to change the colour to {0}", colourName);
}
private void btnConfirm_Click(object sender, EventArgs e)
{
btnConfirm.DialogResult = DialogResult.OK;
}
private void btnCancel_Click(object sender, EventArgs e)
{
btnCancel.DialogResult = DialogResult.Cancel;
}
}
It works fine, but when the dialog pops up it requires me to click on a button twice to use it. Does anyone have an idea why?