Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown RichTextBox1.AllowDrop = True End Sub Private Sub RichTextBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles RichTextBox1.DragEnter If e.Data.GetDataPresent(DataFormats.FileDrop) Then e.Effect = DragDropEffects.Copy End If End Sub Private Sub RichTextBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles RichTextBox1.DragDrop 'ドロップされた内容を表示する Dim items() As String = CType(e.Data.GetData(DataFormats.FileDrop), String()) RichTextBox1.Text = items(0) End Sub