Drag & Drop
§Add a Label to UserControl
§DragLabel_MouseMove
§Application.DoDragDrop
§
You can set up a label on a UserControl that can be used by drag and drop to automate running a command. To do this first add a label to the UserControl and then enable the MouseMove event for that label. In this example the name of the Label is DragLabel. In the MouseMove event you call the DoDragDrop function of the Application. The fourth argument of this function is a class that you need to create that will have a function that will be run when the label is dropped on the AutoCAD drawing. In this case the class is named MyDropTarget.  The other arguments are the DragSource and Data arguments and these are set to the UserControl specified by the Me keyword. The AllowedEffects argument is set to All using the DragDropEffectsAll enumeration.