Results 1 to 7 of 7

Thread: [RESOLVED] vb2008 force enter key press

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2008
    Location
    Australia
    Posts
    145

    Resolved [RESOLVED] vb2008 force enter key press

    this is the code i have so far:

    Code:
    my.computer.sendkeys("Hello all")
    that forces the keys hello all

    when i try it with enter it is like this:

    Code:
    my.computer.sendkeys(keys.enter)
    when ever i try this it forces teh keys 13 that is because teh keycode for enter is 13. does ne1 no any ways around this plz helm me


  2. #2

  3. #3

  4. #4
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: vb2008 force enter key press

    .SendKeys("{ENTER}")
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: vb2008 force enter key press

    keys.enter = 13 which is why you are getting 13 instead of an actual enter press.

    keys.enter is just an enum which is an integer value representing certain keys.

    stimbo gave you the correct answer above. If you had hit F1 and looked in the help file under sendkeys, you would see that, along with a whole bunch of other special strings you can use with SendKeys like sending tab, escape, etc...

  6. #6
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: vb2008 force enter key press

    Send Keys Documentation

    always a good place to start...
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Feb 2008
    Location
    Australia
    Posts
    145

    Re: vb2008 force enter key press

    thanx guys you were a big help

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