Hi,
You can see how to implement drag-and-drop in the "Drag and Drop" and "More Drag and Drop" VB sample projects. This modification of the latter shows how to insert a node, splitting an existing link into two new ones, which happens in the WPF WorkflowDesigner example:
Private Sub FlowChart1_DropInDocVB(ByVal dataObj As FLOWCHARTLibCtl.IVBDataObject, ByVal docX As Long, ByVal docY As Long, ByVal keyState As Long, effect As Long)
Dim s As String
Dim b As FLOWCHARTLibCtl.box
Dim i As Integer
Dim a As arrow
Set a = FlowChart1.GetArrowAt(docX, docY)
If dataObj.GetFormat(vbCFFiles) Then
'some file are dropped
For i = 0 To dataObj.FileCount - 1
s = dataObj.Files(i)
Set b = FlowChart1.CreateBox(docX + i * 10, docY + i * 50, 250, 40)
b.Text = s
Next i
Else
'some text is dropped
s = dataObj.GetData(vbCFText)
Set b = FlowChart1.CreateBox(docX, docY, 100, 100)
b.Text = s
If Not a Is Nothing Then
SplitLink a, b
End If
End If
effect = vbDropEffectCopy
End Sub
Sub SplitLink(a As arrow, b As box)
Dim a2 As arrow
Set a2 = FlowChart1.CreateArrow(b, a.DestinationBox)
a.Destination = b
End Sub
If you are interested in the sample layout code, it should be pretty straightforward to port. Our controls' API has evolved a lot since the ActiveX days, but you can still find one-to-one correspondence between the WPF and ActiveX members. E.g. a node.Bounds assignment will become a call to box.SetRect, and link.ControlPoints assignments will become arrow.CtrlPtX/Y assignments.
I hope that helps,
Stoyan