摘要:
可通过以下语句来设置文本的对齐方式:StringFormat sF = new StringFormat()sF.Alignment = StringAlignment.Far;sF.LineAlignment = StringAlignment.Far;代码:、View Code privatevoidForm1_Paint(objectsender,PaintEventArgse){Graphicsg=e.Graphics;Fontf=newFont("Aris",15,FontStyle.Italic);strings="thisismyname" 阅读全文
摘要:
可通过StringFormat sF = new StringFormat(StringFormatFlags.DirectionVertical);以及使用 g.DrawString(s, f, Brushes.Black, rf,sF);来绘制竖向文本 View Code privatevoidForm1_Paint(objectsender,PaintEventArgse){Graphicsg=e.Graphics;Fontf=newFont("Aris",15,FontStyle.Italic);strings="thisismyname,andwhat& 阅读全文
摘要:
1,主要利用MessageString()这个函数来实现自动换行。截图如下:代码如下:View Code //绘制有边框的字体,并自动换行privatevoidForm1_Paint(objectsender,PaintEventArgse){Graphicsg=e.Graphics;Fontf=newFont("Aris",15,FontStyle.Italic|FontStyle.Strikeout);strings="thisismyname,andwhataboutyou,oknoproblems,everyisok,somethingisgoods,pr 阅读全文