.net - Drawing String with Graphics c# -


this question has answer here:

how draw string graphics in c#? tried code dose not work. thanks.

g.drawstring("string", new font(this.font, fontstyle.bold),                         new brush(), new point(100, 100)); 

error:

error 1 cannot create instance of abstract class or interface 'system.drawing.brush' c:\users\mihai\appdata\local\temporary projects\graphics drawtext\form1.cs 33 73 graphics drawtext

instead of abstract brush have create concrete 1 - example solidbrush (or other of choice).

see msdn list of brush implementations (classes derive brush) can use.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -