.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 

reference


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -