Results 1 to 3 of 3

Thread: "SendKeys"

  1. #1

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    Hi All,

    I have a text box and a command button. I enter some text in the text box and once the command button is clicked, based on the text, some actions are performed. Once i enter text and press enter key, I need to fire the click event of the command button. I know it is done using "Send Keys", but I forgot the syntex.

    Thanks for any help.

    ------------------
    Regards,

    Venkat

    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net


  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    Don't bother with sendkeys when activating something within the same form, it's messy

    try this instead:
    Code:
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
      Command1_Click
    End If
    
    End Sub
    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company

    (please include your vb-world screen name if you email me so I can work out what the 'eck you're talking about!)

  3. #3

    Thread Starter
    Hyperactive Member venkatraman_r's Avatar
    Join Date
    Jul 1999
    Location
    Chennai, INDIA
    Posts
    284

    Post

    Hi Mark,

    Thanx it worked..Ok i would add my vb-world user name when mailing you...

    ..And...I felt something difficult in reading the last few words of ur message? Were u scolding me? eh??

    Thanx for the help.

    ------------------
    Regards,

    Venkat

    [email protected]
    ICQ: 45714766
    http://venkat.iscool.net


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width