如何将记事本能够打开的所有文件,将这些文件拖放到VB程序中的RichTextbox中并打开?

解决方案 »

  1.   

    我用textbox实现了,但用RichTextbox却不行...............
      

  2.   

    Private Sub Form_Load()
    RichTextBox1.OLEDropMode = rtfOLEDropManualMe.Left = (Screen.Width - Me.Width) \ 2
    Me.Top = (Screen.Height - Me.Height) \ 2
    End SubPrivate Sub RichTextBox1_OLEDragDrop(Data As RichTextLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
    RichTextBox1.LoadFile Data.Files(1)End Sub
      

  3.   

    还有就是如何让程序启动时自动在屏幕的正中显示?
    ---------------------------------------------窗体的startupposition属性可以设置