By Adam Nagy
You may want to provide a user control with a list of components that you could drag & drop onto Inventor. In case of .NET it's quite easy to set up. You just have to handle the MouseDown event of the control from which you want to enable the Drag & Drop, and then set up the data that could be dragged onto another applications.
In this case we have a simple .NET Form with a button on it named myButton with text "Drag Me!". If the user starts dragging this button then it will drag a file onto other applications like Inventor, which accept such a thing.
Here is the main part of the C# source code:
public partial class MyForm : Form
private void myButton_MouseDown(
object sender, MouseEventArgs e)
DataObject dragInfo = new DataObject();
StringCollection coll = new StringCollection();
// "Copy" will let us open the ipt
// "Link" will let us insert the ipt in an assembly
DragDropEffects.Copy | DragDropEffects.Link);
Here it is in action: