Private Declare Function SendMessage Lib "user32" Alias "SendMessageW" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const WM_COPY As Long = &H301
Const EM_SETSEL = &HB1&
Private Sub Form_Click()
SendMessage Text1.hWnd, EM_SETSEL, 0&, -1&
'选择要复制的文本内容,第三个参数是启始位置,第四个参数是结束位置;
SendMessage Text1.hWnd, WM_COPY, 0&, 0&
'复制Text1中被选中的文本内容。
End Sub
[[it] 本帖最后由 Joforn 于 2008-10-3 13:01 编辑 [/it]]