.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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -