有没有办法在 C# 的进度条上编写默认文本?
这在 Form_Load 中不起作用,但在单击按钮时可以正常工作...
using (Graphics gr = progressBar1.CreateGraphics())
{
StringFormat sf = new StringFormat(StringFormatFlags.NoWrap);
sf.Alignment = StringAlignment.Center;
gr.DrawString("hello world",
new Font("Arial", 10.0f, FontStyle.Regular),
new SolidBrush(Color.Black),
progressBar1.ClientRectangle,
sf);
}
提前致谢