Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default More control over moving and inserting OLE Objects via code

I want to allow users to move ole objects (images) on the worksheet by
dragging them with the mouse. I can think of three ways to achieve
this (sort of).

1) Switch into design mode. I'm not sure if there is code that will
allow me to do this though - anyone?
2) Trap the object MouseDown, Up and Move events and reposition the
object based on current mouse position. My concern with this one is
that I will overload XL since the event will fire continuously and xl
will have to keep re-drawing the image.
3) Trap the object MouseDown event and create a new mouse pointer icon
(eg. a dashed box) then trap the MouseUp event and reposition the
object to this position. The problem with this one is that I really
need
to create the mouse icon on the fly to get the pointer in the right
position in the box image. Any ideas
how I could do this?

Are my concerns in (2) justified? Does anyone have any other
thoughts/ options/ concerns before I go too far
down one track.

This is also an issue for inserting the objects in the first place. I
think for this option 3 would work
best but I don't know if there is a better approach that allows more
control over inserting objects - some
API calls perhaps? Rather than going as far as inserting the object
(which .OLEObjects.Add does) I want to stop at the point where the
object is ready for the user to place it on the sheet.

I am using ole image objects rather than pictures or drawing objs
because they allow me to create a right
click menu and I can change the image within the same object to
reflect different user choices. Also I can
"discourage" the user from copy/pasting the image.

Thanks a lot,
Andrew
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
moving objects with cell martinson Excel Worksheet Functions 0 July 3rd 08 03:13 PM
inserting objects Ojecprobs Excel Discussion (Misc queries) 1 May 8th 07 09:37 AM
Inserting Objects BeanyBabe Excel Discussion (Misc queries) 1 December 19th 05 10:38 PM
Moving objects Jzz Excel Programming 0 October 17th 05 04:40 PM
inserting objects Johan[_6_] Excel Programming 0 January 12th 05 01:50 AM


All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"