#ScaleLef/Top Errors
3 messages in this thread
Hi Ted,
It's a bird, no it's train, no its….<never mind>.
I haven't heard of a problem with having a problem with 2300-2400. Can you
post sample code to do this? You have to remember that although you can go
past 32K if in another scalemode, when it is converted to pixels, the number
cannot be past these limits(+/-32K). This is also the case if you specify a
scale mode where a user defined unit is equal to 32K, you will get an
overflow if you try to do a CurrentX = 2: Print "Text". This converts to 64K
pixels which will overflow.
Don Funk
There are 2 Replies.
Hiya Don,
I reported the problem about doing Line statements past 2400 or so way back
in May, so I'll have to look in my archives for it…I'll send it your way
when I find it (figure a couple of years..<grin>).
– Ted
Hi Don,
<<I haven't heard of a problem with having a problem with 2300-2400.>>
Hum, just a tad tricky to decipher, but I think you are refering to the VB
bug that causes an Overflow Error if you try to draw well outside the range
of a VB Picture Control. I'm surprised this is not a 'registered' VB bug at
MS Headquarters because it was reported a long time ago and is very easy to
reproduce.
1. Start a new project and place a Picture Control and a Command Button on
your Form.
2. Change the ScaleMode of the Form and the Picture Control to Pixels.
3. In the Command Button's Click Event place the command:
Picture1.Line(0,0)-(3000,0)
4. Run the program and click the Command Button. You will get an Overflow
Error.
Note that we are working in pixels, Win3's native dimension.
Assuming we only vary the X co-ordinate, the value at which VB generates
the Overflow Error is a function of *both* the Picture1.Width and
Picture1.ScaleWidth. Play around with both the Width and ScaleWidth, and
you will find that the value of the largest X co-ord that does not create
an Overflow Error will vary.
KeithF