怎么DrawString竖着写 rt,想竖着绘一排文字,用什么方法呢,应该不会一个个绘吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样来弄:public void DrawVerticalString(){ System.Drawing.Graphics formGraphics = this.CreateGraphics(); string drawString = "Sample Text"; System.Drawing.Font drawFont = new System.Drawing.Font("Arial", 16); System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); float x = 150.0F; float y = 50.0F; System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat(); drawFormat.FormatFlags = StringFormatFlags.DirectionVertical; formGraphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat); drawFont.Dispose(); drawBrush.Dispose(); formGraphics.Dispose();} StringFormatFlags.DirectionVertical; Graphics.RotateTransform(10); //顺时针转10度Graphics.DrawStringGraphics.ResetTransform(); //取消全部变换。 大家来看看这句什么意思 对于二维List对象list,如何给第3行第2列的元素赋值,又如何取得第3行第2列的元素值 窗体调用问题! 请问有关用英文字母与数字能组成多少个组合? 请教个问题 C# 查询 出问题···· 使用类GraphicsPath()画弧行边角的矩形窗体 有关showModalDialog的问题 在用委托事件时出现未将对象引用设置到对象的实例 SOS!!请求支援:上传问题(file控件),Excel问题(分不够再加) 关于VS2008 Treeview控件的事件处理方面问题 c#:急求一正则表达式
public void DrawVerticalString()
{
System.Drawing.Graphics formGraphics = this.CreateGraphics();
string drawString = "Sample Text";
System.Drawing.Font drawFont = new System.Drawing.Font("Arial", 16);
System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
float x = 150.0F;
float y = 50.0F;
System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat();
drawFormat.FormatFlags = StringFormatFlags.DirectionVertical;
formGraphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);
drawFont.Dispose();
drawBrush.Dispose();
formGraphics.Dispose();
}
Graphics.DrawString
Graphics.ResetTransform(); //取消全部变换。