发布网友 发布时间:2024-10-21 20:18
共1个回答
热心网友 时间:2024-10-21 21:33
现学现卖,这样可行?
button Click代码
private void button1_Click(object sender, EventArgs e)
{
if (button1.Font.Bold == false && button1.Font.Italic == false && button1.Font.Underline == false)
{
button1.Font = new System.Drawing.Font("宋体", 9f, ((System.Drawing.FontStyle)(((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)
| System.Drawing.FontStyle.Underline))));
}
else
{
button1.Font = new System.Drawing.Font("宋体", 9f);
}
}