Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Macro - Mouse Move Shape or Drag and Drop

524 views
Skip to first unread message

magicmen

unread,
Apr 29, 2008, 10:36:01 AM4/29/08
to
I've been playing around with this macro for a couple of days in hopes of
using it for moving game board pieces (like Chess pieces). I understand that
there is another macro out there (created by Hans Werner Hofmann / Ute Simon)
but, from the places where I've downloaded it, it does not allow you to see
the source (understandable). Thus, I've been using the macro from:

http://officeone.mvps.org/vba/mousemove_shape.html

This macro seems to work properly where you click the object that you want
to move and, by tracking the location of the mouse, applies the same
translation vector to the object being clicked. However, this function is
very choppy and I would like to increase the refresh rate of this
calculation. Basically, I think I've narrowed it down to the "SetTimer" part
of the code but I haven't been able to figure out (even tried Googling) the
arguments associated with the command. I've also tried changing the values
but did not observe any significant changes.

Essentially, I would like the objects that I am moving to move along with
the mouse (which will be moving short distances so it won't look choppy like
a movie with missing frames). The slideshow itself is very small in size
(less than 300kb) and I also have 2GB of ram to back up any questions on
performance. Any help would be greatly appreciated.

Thanks!

Sean

John Wilson

unread,
Apr 29, 2008, 11:22:00 AM4/29/08
to
SetTimer is an API call. Be very careful changing the arguments! It already
is set to call the sub every 10 milliseconds so I doubt if you will improve
on that.
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk

magicmen

unread,
Apr 29, 2008, 12:19:01 PM4/29/08
to
Thanks John. Yes, I understand that it was set to 10 milliseconds but
changing that value to 1 millisecond and it is still very bad. Would you
happen to have any other recommendations of accomplishing this task? Are
other macros more efficient for this type of drag and drop action?

Thank you for your time.

Sean

Steve Rindsberg

unread,
Apr 29, 2008, 3:05:50 PM4/29/08
to
In article <03051179-A498-4690...@microsoft.com>, Magicmen wrote:
> Thanks John. Yes, I understand that it was set to 10 milliseconds but
> changing that value to 1 millisecond and it is still very bad.

You might try it on different systems. It may be that your video subsystem isn't
keeping up with the movement.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


magicmen

unread,
Apr 30, 2008, 12:34:04 AM4/30/08
to
I think I found the (simple) solution. First, I visited the dead gekko page

http://www.deadgekko.co.uk/downloads.htm

and downloaded the source for the VB code. The one at this site is
different (and somewhat streamlined) from the other one that I had. Of
course, I don't think the actual efficiency of the code is noticeably
different. Instead, what ended up making the difference was the number of
images on the slide that appeared to be slowing down the slide itself. This
is likely a memory issue (even with 2gb of ram). All I did was keep my
entire presentation in tact and removed all of the images from the one slide
where I had the drag and drop macro and it moved faster than ever. What I'm
going to do is combine all of the images and have it as one background image
and that should do the trick.

All hail the drag and drop macro.

Thanks for all of your dedication and guidance!

Sean

0 new messages