Results 1 to 8 of 8

Thread: Functions like Cut, copy and paste..How?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176

    Functions like Cut, copy and paste..How?

    How can i use function like that in a prog that uses many many textboxes? do i have to programm them for each textbox indevidually? thnx
    JpEgy

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You dont have to, if you have text boxes on a form, you'll automatically get the context menu with cut, paste, copy etc. when you right click.
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    but i want them in the menu, just like any other prog...
    JpEgy

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    The right-click Context menu is automaticly added, but if you mean just the functions to copy & paste? Then you should use the Clipboard object...
    I wrote two small functions for you to show how it works:

    VB Code:
    1. Private Function GetClipBoardText() As String
    2.         If Clipboard.GetDataObject.GetDataPresent("Text") Then
    3.             Return Clipboard.GetDataObject.GetData("Text")
    4.         End If
    5.     End Function
    6.  
    7.     Private Sub SetClipBoardText(ByVal sString As String)
    8.         Clipboard.SetDataObject(sString)
    9.     End Sub
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    that's what i mean! thanx alot!
    JpEgy

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    hmmm since i have lots of textboxes in my app is there someway i can make a sub to all of them? like the copy function...can i make it for for all textboxes at once?
    JpEgy

  7. #7
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I don't really see what you mean...
    you mean like if you click the paste button that it will paste in all textboxes or what?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    I found it out alrteady . it's like textbox1.copy , .cut , that's what i was looking for, thnx anyway
    JpEgy

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