Results 1 to 7 of 7

Thread: hotKeys

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    130

    hotKeys

    how i can create a program
    Once I click on certain buttons software that will copy the text I will indicate
    (like Ctrl + c)

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

    Re: hotKeys

    Your request is a bit unclear. Are you saying that you want to be able to select text in any application and then press some key combination to have that text copied into your application? That's a bit of an educated guess but, if it's wrong, please provide a clearer description of what you want.
    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
    Fanatic Member
    Join Date
    Aug 2010
    Posts
    624

    Re: hotKeys

    Umm as far as I can tell from your request, you want a button to copy and paste the indicated text?

    If so, add this to your button_click event:

    vb Code:
    1. My.Computer.Clipboard.SetText(TextBox1.Text)

    This will add the text in TextBox1.Text to the clipboard

    Not sure whether that's what you wanted.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    130

    Re: hotKeys

    Quote Originally Posted by J-Deezy View Post
    Umm as far as I can tell from your request, you want a button to copy and paste the indicated text?

    If so, add this to your button_click event:

    vb Code:
    1. My.Computer.Clipboard.SetText(TextBox1.Text)

    This will add the text in TextBox1.Text to the clipboard

    Not sure whether that's what you wanted.
    that's why i want, but i not worked

    this my code:

    The code makes the moment I pressed the keys "Ctrl + c + 1" i will show me a MsgBox message but I want it to copy the text I will indicate right software, the code you gave me an error does.

    Thanks for your help

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    130

    Re: hotKeys

    Up..

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

    Re: hotKeys

    I understand that there's a language barrier here but your request still doesn't make sense to me. Can you try to explain more clearly, step by step, exactly what you want the user to do and what you want the app to do.
    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

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    130

    Re: hotKeys

    No matter, it works. Thanks for your help
    Quote Originally Posted by J-Deezy View Post
    Umm as far as I can tell from your request, you want a button to copy and paste the indicated text?

    If so, add this to your button_click event:

    vb Code:
    1. My.Computer.Clipboard.SetText(TextBox1.Text)

    This will add the text in TextBox1.Text to the clipboard

    Not sure whether that's what you wanted.

    The code was supposed to be this:

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