摘要:
View Code staticvoidMain(string[]args){List<Person>personL=newList<Person>();personL.Add(newPerson("wtq","男","13616009873",23));personL.Add(newPerson("wta","女","13616009871",24));personL.Add(newPerson("wtb","男&quo 阅读全文
摘要:
绘制多行文本,如图:思路主要设置drawstring的第二个参数的高度,这样就ok了。代码如下;View Code //privatevoidForm1_Paint(objectsender,PaintEventArgse)//{//Graphicsg=e.Graphics;//FontFamilyff=newFontFamily(GenericFontFamilies.Serif);//Fontf=newFont(ff,12,FontStyle.Italic|FontStyle.Bold|FontStyle.Strikeout|FontStyle.Underline);//stringst. 阅读全文
摘要:
绘制有边框的字体,如图思路,通过stringMessure来获取字体的长度。如下:View Code privatevoidForm1_Paint(objectsender,PaintEventArgse){Graphicsg=e.Graphics;FontFamilyff=newFontFamily(GenericFontFamilies.Serif);Fontf=newFont(ff,12,FontStyle.Italic);stringstr="Height"+f.Height;//不添加而外的高度SizeFsf=g.MeasureString(str,f,int.M 阅读全文