
Tracking shape position and rotation WHILE moving
Does anyone know how to do that?
When moving a shape by holding the left mouse button required data is
shown in status bar.
PinX, locPinX, angle: update ist done when releasing left mouse
button.
It seems that Visio copies a new object and deletes the old one when
moving. Is there a way to access
the new object before this deletion?
Other possible solutions:
1.) access the status bar data or capture it via api -> it's possible
to place a button (itematid(visuiobjsetdrawing).statusbaritems(11)
works!)
but I can't get width, height and angle (I know the status bar object
never worked well)
capture via api -> too hard (would work in Visio 2002 too, where
status bar object is removed)
2.) move shapes depending on mouse movement with pinx + step -> you
have to convert screen pixels to visio-units, depending on paper size,
zoom etc. -> too hard
(location of shape has always to be AT mouse cursor) -> depends on
e.g., mouse acceleration, api functions used: GetAsyncKeyState(&H1)
3.) move shapes with Visio's functions, but simulate release and hold
of mouse button while moving, api functions used: mouse_event &H2, 0,
0, 0, 0 (;&H4)
-> seems not to be a clever solution and may lead to some window
chaos, doesn't work either
Now I'm stuck. There are no more ideas.
Thank you for constructive comments.
Thomas