Quantcast
Channel: Chris Bitting » graphics
Browsing latest articles
Browse All 2 View Live

Image may be NSFW.
Clik here to view.

VB.net Measure string width & height – including multi-line strings

Dim fontToMeasure As New Font("Microsoft Sans Serif", 14, FontStyle.Bold) Dim sizeOfString As New SizeF Dim g As Graphics = Me.CreateGraphics sizeOfString = g.MeasureString("This is line 1" &...

View Article



Image may be NSFW.
Clik here to view.

C# – Measure String Width & Height (in pixels) Including Multi-line Text

A while back I posted a VB snippet of a simple way to measure text length in pixels. The below is a C# version, with some minor improvements (like not needing a form, so it’s okay to use with console...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images