摘要:
可通过以下语句来设置文本的对齐方式: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" 阅读全文
posted @ 2011-08-02 13:01
wtq
阅读(673)
评论(0)
推荐(0)
摘要:
可通过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& 阅读全文
posted @ 2011-08-02 13:00
wtq
阅读(848)
评论(0)
推荐(0)
摘要:
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 阅读全文
posted @ 2011-08-02 08:25
wtq
阅读(3316)
评论(0)
推荐(1)
浙公网安备 33010602011771号