On Jul 26, 2006, at 11:44 AM, Adam Ernst wrote:
You can't instantiate Graphics; you must retrieve it from the .Graphics property of a Picture.

Furthermore, I have absolutely no clue why you would think that Graphics.Width would change after drawing into it. What you want is this:

dim p as new picture(1, 1, 32)
dim g as graphics = p.graphics

g.TextFont = MyStaticText.TextFont // And so on with size, etc.

MyStaticText.Width = g.StringWidth(MyStaticText.Text)

Ah, okay.  That works.  Thanks!

Andrew Keller

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to