How about this?
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents tvRO As System.Windows.Forms.TreeView
Friend WithEvents tvRW As System.Windows.Forms.TreeView
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.tvRO = New System.Windows.Forms.TreeView
Me.tvRW = New System.Windows.Forms.TreeView
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'tvRO
'
Me.tvRO.ImageIndex = -1
Me.tvRO.Location = New System.Drawing.Point(152, 48)
Me.tvRO.Name = "tvRO"
Me.tvRO.Nodes.AddRange(New System.Windows.Forms.TreeNode() {New
System.Windows.Forms.TreeNode("RORoot", New
System.Windows.Forms.TreeNode() {New
System.Windows.Forms.TreeNode("ROChild")})})
Me.tvRO.SelectedImageIndex = -1
Me.tvRO.Size = New System.Drawing.Size(96, 176)
Me.tvRO.TabIndex = 0
'
'tvRW
'
Me.tvRW.AllowDrop = True
Me.tvRW.ImageIndex = -1
Me.tvRW.Location = New System.Drawing.Point(16, 48)
Me.tvRW.Name = "tvRW"
Me.tvRW.Nodes.AddRange(New System.Windows.Forms.TreeNode() {New
System.Windows.Forms.TreeNode("RWRoot", New
System.Windows.Forms.TreeNode() {New
System.Windows.Forms.TreeNode("RWChild")})})
Me.tvRW.SelectedImageIndex = -1
Me.tvRW.Size = New System.Drawing.Size(96, 176)
Me.tvRW.TabIndex = 1
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(164, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(72, 16)
Me.Label1.TabIndex = 2
Me.Label1.Text = "RO"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(32, 16)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 16)
Me.Label2.TabIndex = 3
Me.Label2.Text = "RW"
Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
Me.ClientSize = New System.Drawing.Size(292, 267)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.tvRW)
Me.Controls.Add(Me.tvRO)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
tvRO.Nodes(0).Expand()
tvRW.Nodes(0).Expand()
End Sub
Private Sub tvRO_ItemDrag(ByVal sender As Object, ByVal e As
System.Windows.Forms.ItemDragEventArgs) Handles tvRO.ItemDrag
Debug.WriteLine("Doing RO DoDragDrop")
DoDragDrop(tvRO.SelectedNode, DragDropEffects.Copy)
End Sub
Private Sub tvRW_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles tvRW.DragEnter
Debug.WriteLine("Enter RW DragEnter")
e.Effect = e.AllowedEffect
End Sub
Private Sub tvRW_DragOver(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles tvRW.DragOver
Debug.WriteLine("Enter DragOver")
Dim tn As TreeNode
Dim ptClient As System.Drawing.Point = tvRW.PointToClient(New
System.Drawing.Point(e.X, e.Y))
tn = tvRW.GetNodeAt(ptClient)
If Not IsNothing(tn) Then
e.Effect = e.AllowedEffect
Else
e.Effect = DragDropEffects.None
End If
End Sub
Private Sub tvRW_DragLeave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles tvRW.DragLeave
Debug.WriteLine("Enter RW DragLeave")
End Sub
Private Sub tvRW_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles tvRW.DragDrop
Debug.WriteLine("Enter RW DragDrop")
Dim tn As TreeNode
Dim ptClient As System.Drawing.Point = tvRW.PointToClient(New
System.Drawing.Point(e.X, e.Y))
tn = tvRW.GetNodeAt(ptClient)
If Not IsNothing(tn) Then
Debug.WriteLine("Adding Node " &
e.Data.GetData("System.Windows.Forms.TreeNode").text)
tn.Nodes.Add(New
TreeNode(e.Data.GetData("System.Windows.Forms.TreeNode").text))
tn.Expand()
End If
End Sub
End Class