On Sunday, March 10, 2002, at 05:21 PM, jeb eddy wrote:
Charles Yeomans wrote:
Be aware that Canvas.Graphics is not the same object that you're
passed in the Paint event handler; confusing the two can be a problem.
ok, I'm confused. I have thought that they are the same, and my apps
work ok. How are they different?
I mean that g <> Canvas.Graphics; that is, they do not refer to the same
object. So, for instance, if you write
me.graphics.TextFont = "Times"
in the Open event of the Canvas and put
g.DrawString "Foo", 25, 25
in the Paint event of the Canvas, the text "Foo" will not be rendered
using Times; it will be rendered using the System font.