J
John Coleman
Greetings,
In a class I am currently teaching we are about to talk about
gradient vectors. I prepared an XY scatter-chart whose background was
set to be a contour-map of a function of 2 variables. I wrote a
mouse-move event handler which draws the gradient to the surface at
that point. After I was finally able to find a way to translate from
the annoying "client coordinates" returned by the mouse move event into
the coordinate system determined by the chart axis, I was able to get
it to work as I intended. The problem is - flicker! Big time. I've
tried things like briefly turning off screen updating, etc. But nothing
seems to work. From this group I downloaded a function to wrap an API
call to LockWindows (or something like that), but it didn't seem much
better than toggling screen-updating. In frustration, I turned it into
a mouse-down event. I can still move around the contour, clicking here
and there to display the gradient, but it now lacks the animation which
would be have been cool. Is there a work around or is this just an
unavoidable by-product of the fact that Excel wasn't designed for
animation?
Thanks in advance
-John Coleman
In a class I am currently teaching we are about to talk about
gradient vectors. I prepared an XY scatter-chart whose background was
set to be a contour-map of a function of 2 variables. I wrote a
mouse-move event handler which draws the gradient to the surface at
that point. After I was finally able to find a way to translate from
the annoying "client coordinates" returned by the mouse move event into
the coordinate system determined by the chart axis, I was able to get
it to work as I intended. The problem is - flicker! Big time. I've
tried things like briefly turning off screen updating, etc. But nothing
seems to work. From this group I downloaded a function to wrap an API
call to LockWindows (or something like that), but it didn't seem much
better than toggling screen-updating. In frustration, I turned it into
a mouse-down event. I can still move around the contour, clicking here
and there to display the gradient, but it now lacks the animation which
would be have been cool. Is there a work around or is this just an
unavoidable by-product of the fact that Excel wasn't designed for
animation?
Thanks in advance
-John Coleman