Visio 2003 Developer's Survival Pack Tools and Samples

Chapter 29: Drag and Drop and IDataObject (VB)
Visio 2003 DSP home   This page

Overview

This sample VBVSL demonstrates drag-and-drop of masters and shapes to/from the Visio page. Note: This sample demonstrates two main points beyond the VBA sample ReplaceStencil.vdx:

1. How to create stencil replacement functionality in VB (or VBA for that matter) without using the DAVBDragDropSupport.dll.

 2. Both dragging from and dropping to the listbox.

Installation

Please see the general instructions in VBVSL General Install, Run and Source Code Notes before trying to exercise VBVSL samples! In addition, the project needs a reference to a type library for IDataObject (such as DAIDataObject.dll) is still needed. That library does not need to be "installed" by regsvr32, you just need to use the References dialog box to browse to it.

Files

File Description
VBVSL_DnD.dll DLL implementing the ActiveX portion of the VSL. This is compiled from the source files below.
Remaining VBVSL_DnD.* files Source code for the above DLL. See book for details on typical VBVSL structure, and notes on this VBVSL in particular.
DragNDrop.vdx Visio drawing document that provides starting point for exercising this VBVSL

Operation

After installing this VBVSL, try the following exercises.


Article Created: 2003-09-01  Last edit: Last edit: 03-10-29 Graham Wideman
Go to:
  DiagramAntics.com