How to select the text in a textbox and send it to the clipoard.
1 2 3 4 5 6 7 8 9 10 11 12 | 'Controls - How to select the text in a textbox and send it to the clipoard. Option Explicit Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const WM_COPY = &H301 Private Const EM_SETSEL = &HB1 Private Sub Form_Load() SendMessage txtSearch.hwnd, EM_SETSEL, 0, 0 SendMessage txtSearch.hwnd, WM_COPY, 0, 0 End Sub |
Tags: activex control source, clipoard, Controls, database source code, how to visual basic, how-to, select, send, text, textbox, vb activex control, vb net source code, vb6 learn, visual basic 6 examples, visual basic api, visual basic source code library