This sample implements the ICommand and IToolControl interface and is
intended to be used within the ArcMap application. This control provides a slider
bar that is used to buffer the selected features. The individual buffers are unioned
together and the resultant polygon is displayed on the screen for visual
feedback. The result polygon is drawn with an XOR pen. Using an XOR pen means that
drawn once the polygon appears on screen, but drawn a second time it disappears. This
means that by successively drawn the polygon the polygon is visually updated rapidly
without the need for a complete screen redraw.
How to use:
Start MS Visual Basic 6 and open the project file BufferToolControl.vbp.
Ignore any warnings about not being able to set version compatibly. This is due to
the DLL not being present when the project is loaded.
The project must be compiled to a DLL. From the File Menu Select Make.
This will create the DLL in the same directory as the project.
Now that the DLL is made the version compatibility must be set. On the Project
menu select the Properties menu item and then on the Component tab set the
Version Compatibility to be Binary and select the newly created DLL file.
Start ArcMap and load some data into the map. Display the Customize
dialog and select the Commands tab. Select the appropriate document to save
the customizations in and then press the Add from file... button. Using the
file selection dialog, select the newly compiled DLL and press OK.
Press OK on the information dialog telling you what class has been added.
In the list of categories scroll down to the Category Samples and select
Select the newly added Buffer command from the Commands list and drag it
onto a toolbar.
Close the Customize dialog.
The Sample buffer tool control is now ready ready for testing. Interact with the
command and note the various behavior and properties of the tool.