.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
Post a Comment