MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show("Are there any other products in the carton?", "Question", buttons, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
if (result == DialogResult.Yes)
{
trans.Rollback();
MessageBox.Show("Please go to the controll room for new packaging", "Message");
frmHome main = new frmHome(empid);
main.Show();
this.Hide();
}
if (result == DialogResult.No)
{
trans.Commit();
frmPalletCartonAllocation pca = new frmPalletCartonAllocation(pack, companyIdNo, skuIdNo, UnitsInCarton, UnitsInPack, carton_Code, orderNo, grvIdNo, empid);
pca.Show();
this.Hide();
}
在消息框出现的那一刻,“是”按钮被突出显示。我希望“否”按钮突出显示。所以默认“否”。
我该怎么做呢?