I had a long standing bug in an image resizing method (in a window).
Sometimes, I get an eye on this kind of code hoping to discover “why the bug”…
And minutes ago, I was asking myself what that
Me.Height could be in a Method.
I looked carefully and think that Me refers to a Canvas, and replaced me with the Canvas reference.
All of a sudden, the bug disappears.
After some minutes (doing something else), I realized that the Method where the bug resides before its removal probably was in that Canvas long time ago.
For some unknow reason, the linker / compiler / whatever (Xojo) was not complaining about it before I changed the code.
But my question remains: what Me refers to in a Method ?
For Info: that line of code was used to center the resized image in the Canvas (the X value of the g.DrawPicture call).
And, yes, now the image is centered and the real bug is squashed. (the image appears regardless of its original size)…