up

解决方案 »

  1.   

    Option ExplicitPrivate Const WM_USER As Long = &H400
    Private Const EM_SETTARGETDEVICE As Long = WM_USER + 72
    Private Const WM_PASTE = &H302Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As LongPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
         (ByVal hwnd As Long, ByVal msg As Long, ByVal wp As Long, Ip As Any) As LongPrivate Sub Command1_Click()
        RichTextBox1.LoadFile "c:\111.txt"
    End SubPrivate Sub Command2_Click()
        SendMessage RichTextBox1.hwnd, EM_SETTARGETDEVICE, 0, 0
    End Sub
      

  2.   

    http://www.csdn.net/Develop/article/16%5C16410.shtm