Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    106

    Unanswered: Copy Value of Textbox to Clipboard

    Hi Can anyone help please?

    I'm trying to copy text from a textbox to the clipboard so that a user can use the CTRL + V (paste) to return the value in another application

    The only other threads i have found use the DB6 clipboard which means pages of API calls.

    There must be a way to do this simply?

    Please help!

    Thanks
    sugarflux

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Copy Value of Textbox to Clipboard

    Originally posted by sugarflux
    Hi Can anyone help please?

    I'm trying to copy text from a textbox to the clipboard so that a user can use the CTRL + V (paste) to return the value in another application

    The only other threads i have found use the DB6 clipboard which means pages of API calls.

    There must be a way to do this simply?

    Please help!

    Thanks
    sugarflux
    Select the text and right-click and select copy OR press Ctrl-C ...

  3. #3
    Join Date
    Aug 2003
    Posts
    106
    Sorry - you misunderstood

    I should have specified i want to copy the text from VB...

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by sugarflux
    Sorry - you misunderstood

    I should have specified i want to copy the text from VB...
    I didn't misunderstand ... You asked the wrong question ... You are correct that this can only be done thru API calls ... Unfortunately I don't have them nor the code I wrote ( in the past ) doing this very thing ... Handy (it was done VC ++ )

  5. #5
    Join Date
    Jan 2004
    Posts
    184
    The Clipboard object is used to manipulate text and graphics on the Clipboard. You can use this object to enable a user to copy, cut, and paste text or graphics in your application. Before copying any material to the Clipboard object, you should clear its contents by as performing a Clear method, such as Clipboard.Clear.

    The Clipboard object can contain several pieces of data as long as each piece is in a different format. For example, you can use the SetData method to put a bitmap on the Clipboard with the vbCFDIB format, and then use the SetText method with the vbCFText format to put text on the Clipboard. You can then use the GetText method to retrieve the text or the GetData method to retrieve the graphic. Data on the Clipboard is lost when another set of data of the same format is placed on the Clipboard either through code or a menu command.
    In abundance of water only the fool is thirsty. Bob Marley.

Posting Permissions

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