Results 1 to 8 of 8

Thread: send key's command

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    462

    Exclamation send key's command

    ok i have a textbox that my mouse double click's on so it highlight's the text and i need it to copy that text

    sendkeys.send({^+C})
    i know it's something like that but it's not working for me i just need to send
    ctrl+c to copy it and i dont know the code's if you know please post

    EDIT> k someone gave me the code it's
    System.Windows.Forms.SendKeys.Send("^c")

    now i need the space key what is the code for it i tried this and it dident work

    SendKeys.Send("{SPACE}")
    Last edited by tweaker99; Mar 17th, 2009 at 07:31 AM.

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: send key's command

    Quote Originally Posted by tweaker99 View Post
    ok i have a textbox that my mouse double click's on so it highlight's the text and i need it to copy that text

    sendkeys.send({^+C})
    i know it's something like that but it's not working for me i just need to send
    ctrl+c to copy it and i dont know the code's if you know please post
    Is this textbox within your app?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    462

    Re: send key's command

    it's in my webbrowser and i got the code i was asking for now i just need to space code
    System.Windows.Forms.SendKeys.Send("{space}")
    that doesn't work for me doesn anyone know how to send the space key ?

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: send key's command

    http://msdn.microsoft.com/en-us/libr...ys(vs.71).aspx

    You have to make sure your cursor is in the field when the command is sent. SendKeys is pretty flimsy to use.

    Pino

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    462

    Re: send key's command

    i seen that but it doesnt show the SPACE key

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: send key's command

    Try

    SendKeys.Send("{ }")

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    462

    Re: send key's command

    nope

  8. #8
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: send key's command

    SendKeys.Send(" ");

    Works ok.

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