我有这个代码
public static bool Delete(int ID, string ProductName)
{
if (MessageBox.Show(productName + " will be deleted Permanently ", "Confirm Delete Option", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
{
return false;
}
{
return true;
}
}
Run Code Online (Sandbox Code Playgroud)
我需要的是使消息框中的productName下面为红色
if (MessageBox.Show(productName + " will be deleted Permanently "
Run Code Online (Sandbox Code Playgroud)
您必须为此创建自己的表单.在那里你创建一个标签并定义你的字体.之后,您可以定义您的no和yes按钮.
private void No_button_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.No;
this.Close();
this.Close();
}
Run Code Online (Sandbox Code Playgroud)
同为yes按钮有通过创建自己的形式,例如限位多等优点.
| 归档时间: |
|
| 查看次数: |
1082 次 |
| 最近记录: |