我有這樣的代碼如何在C#代碼的消息框中使字符串變量的字體顏色爲紅色?
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;
}
}
什麼,我需要的就是讓產品名稱在下面的紅色消息框顏色
if (MessageBox.Show(productName + " will be deleted Permanently "
恐怕您必須製作自己的自定義消息框 – slawekwin
您無法做到這一點必須製作一個你自己。請參閱:http://social.msdn.microsoft.com/Forums/en/winforms/thread/7e5b9237-7502-4eba-aaed-48ebce2ce8a7和http://stackoverflow.com/questions/2259027/bold-text-in- messagebox – Habib
@ SQL.NET有什麼'html'與這個問題有關? – freebird