Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21238

Using Ctrl+C and ctrl+V

$
0
0
Hello All, I'm trying to use control key ctrl+c to copy from textbox and use ctrl+v to paste in webform field as following but code not paste text in webform field! please what I'm doing wrong? or is there any better idea to accomplish this? Thank you for your time to read my post.
Code:

  txtFields(17).Text = adoPrimaryRSImp("dtContractDate")
        txtFields(17).SetFocus
        SelectAllText txtFields(17)  'Mark text
        SendMessage txtFields(17).hWnd, WM_COPY, ByVal 0&, ByVal 0&        'COPY Text
        SendMessage IE.Document.Forms.Form1.ctl00_ContentPlaceHolder1_dtContractDate_dateInput.hWnd, WM_PASTE, ByVal 0&, ByVal 0&  'PASTE Text
       
        txtFields(15).Text = adoPrimaryRSImp("dtBirthDate")
        txtFields(15).SetFocus
        SelectAllText txtFields(15)
        SendMessage txtFields(15).hWnd, WM_COPY, ByVal 0&, ByVal 0&
        SendMessage IE.Document.Forms.Form1.ctl00_ContentPlaceHolder1_dtBirthDate_dateInput.hWnd, WM_PASTE, ByVal 0&, ByVal 0&


Viewing all articles
Browse latest Browse all 21238

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>