Drawing Control DragDrop Postioning Question

K

kvr

Summary of problem

I have a Visual Basic 6 application which utilizes the Visio
DrawingControl. The screen contains the Drawing Control and a
Datagrid. I'm trying to dragdrop a part from the Datagrid onto the
drawing. I look up the shape for the selected part in a reference
table select the appropriate stencil and drop the selected part/shape
onto the drawing. - Everything works fine except for the position
where I manually drop the shape into the drawing. The dragdrop event
passes x, y coordinates that are relative to the Drawing Control
itself and not the position on the drawing where I'd like the shape to
end up.

Question
How do I determine the document x, y position, from the Drawing
Control's dragdrop event.


Thanks
 
D

David Parker [Visio MVP]

Just a thought:
Graham Widemans book "Visio Developers Survival Guide" contains an example
of a master drag'n'drop which uses the master object, just like you are
dragging from a stencil, ie the cursor is the master object. Therefore, you
do not need to know the cursor position (x,y) because you just drag'n'drop,
then capture the ShapeAdded event, if you want more detail.

Are you trying to do it a different way?
 
K

kvr

It sounds like what I want to do - I'll check out the reference.

Thanks for the quick response
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top