Results 1 to 4 of 4

Thread: Cut, Copy and Paste in VB programming

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Posts
    25

    Post

    Does anyone happen to know how a program can be written, so in an event procedure, text could be cut, copied or pasted? I really need the copy and paste ones. So, if u can get me all 3 of them i'd really appreciate that. thanks!

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    Do you need to do it for text only or for Pictures too?

    ------------------
    Visual Basic Programmer
    -----------------
    PolComSoft
    You will hear a lot about it.

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Not sure I get exactyl what you want, but, you can send the Cut/Copy Paste commands from code using the SendKeys Method, eg.

    SendKeys "^X", 1 'Cut
    SendKeys "^C", 1 'Copy
    SendKeys "^V", 1 'Paste


    Plus you can add and remove things from the the Clipboard using the Clipboard Object, eg.

    Clipboard.SetText "Some Text"


    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  4. #4
    Lively Member Backbraker's Avatar
    Join Date
    Dec 2000
    Location
    Lummen, Belgium
    Posts
    117
    The Clipboard has the following events :

    Clipboard.Gettext => Reads Text from Clipboard

    Clipboard.Settext "text" => Puts text on Clipboard
    Clipboard.Settext var => Copy variable to clipboard
    Clipboard.Settext Text1.text => Copy content of Textbox to clipboard

    Clipboard.Clear => Empties the clipboard

    Just paste this code under a button or something and Voilà...
    Breaker

    (VB 6.0 ENT SP3 WIN 2000 PROF)=> WORK
    (VB 6.0 ENT SP3 WIN ME)=> HOME -> Upgrade to .NET is coming

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