-
Hi,
I'm still working on shapes, now I found the following strange behaviour:
You have shape on your form (scalemode Pixel)
Using the Timer you move it by 0.1 for .left and .top (shape1.move shape1.left+0.1,shape1.top+0,1), everything works o.k.
Try to do the same with a value of 0.01. Nothing happening, that's the strange thing, does anyone know why!
I even looked at the values of shape1.left and.top.
In the first case everything worked as planned (the values increased, but not excatly by 0,1 steps???). In the second case the values just stayed the same.
-
That's probably because it's such a small number that VB will just round it down to 0.
-
Store it in your own variable:
Code:
Dim PosX as Single
Dim PosY as Single
Timer()
PosX = PosX + 0.01
PosX = PosX - 0.1
Shape1.Move PosX, PosY
End Sub