Results 1 to 9 of 9

Thread: how to activate copy, paste, delete command

  1. #1

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    how to activate copy, paste, delete command

    what is the vb.net command to activate copy on an external(non vb.net) program (such as IE) ?

    also what is the vb.net command to activate paste, delete on an external(non vb.net) program (such as IE) ?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: how to activate copy, paste, delete command

    There is no such "command" in VB. You could try SendKeys.Send to send the appropriate key combinations, but that's probably no good because your app will probably have focus at the time.

    You could also use PInvoke to get the handle of the desired window and then send the appropriate message to that window. That would involve calling the Windows API functions FindWindow, FindWindowEx and SendMessage. There are lots of examples of those around as it's a very common combination. You just have to figure out what messages to send. I'm guessing that it would WM_COPY and WM_PASTE but you should probably be able to at www.pinvoke.net.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: how to activate copy, paste, delete command

    the SendKeys.Send command for the copy, paste,delete would be great

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: how to activate copy, paste, delete command

    So, what part did you not understand when you read the documentation for the SendKeys.Send method?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: how to activate copy, paste, delete command

    is this vb.net or vb6
    SendKeys "^{C}"
    ?
    Last edited by moti barski; Apr 2nd, 2011 at 10:08 PM.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: how to activate copy, paste, delete command

    If you read the documentation then you will have your answer.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: how to activate copy, paste, delete command

    Me and bergerkiller answered his question earlier today, here, but he wants an easy copy and paste solution instead of doing the work involved. But I'm fairly certain there is no copy and paste solution.

    Duplicate post reported.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  8. #8

    Thread Starter
    Banned
    Join Date
    Mar 2009
    Posts
    764

    Re: how to activate copy, paste, delete command

    can you link me to the documentation you are refering to ?

  9. #9
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: how to activate copy, paste, delete command

    Quote Originally Posted by moti barski View Post
    can you link me to the documentation you are refering to ?
    Documentation
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

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