.net - How to set color for a font class- object in VB.NET..? -
how set color font class- object in vb.net..? mean..
dim myfont new font("microsoft sans serif", 16, fontstyle.bold) e.graphics.drawstring(tabmain.tabpages(e.index).text, myfont, systembrushes.highlighttext, paddedbounds)
how can set font class object(myfont) - color black. ?
just expand systembrushes.highlighttext
new solidbrush(color.black)
public sub drawstringrectanglef(byval e painteventargs) ' create string draw.' dim drawstring [string] = "sample text" ' create font , brush.' dim drawfont new font("arial", 16) dim drawbrush new solidbrush(color.black) ' create rectangle drawing.' dim x single = 150.0f dim y single = 150.0f dim width single = 200.0f dim height single = 50.0f dim drawrect new rectanglef(x, y, width, height) ' draw rectangle screen.' dim blackpen new pen(color.black) e.graphics.drawrectangle(blackpen, x, y, width, height) ' draw string screen.' e.graphics.drawstring(drawstring, drawfont, drawbrush, drawrect) end sub
Comments
Post a Comment