Click to See Complete Forum and Search --> : Functions like Cut, copy and paste..How?
JpEgy
Apr 3rd, 2002, 03:38 PM
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
DevGrp
Apr 3rd, 2002, 06:31 PM
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.
JpEgy
Apr 4th, 2002, 07:52 AM
but i want them in the menu, just like any other prog...
Jop
Apr 4th, 2002, 08:01 AM
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:
Private Function GetClipBoardText() As String
If Clipboard.GetDataObject.GetDataPresent("Text") Then
Return Clipboard.GetDataObject.GetData("Text")
End If
End Function
Private Sub SetClipBoardText(ByVal sString As String)
Clipboard.SetDataObject(sString)
End Sub
JpEgy
Apr 4th, 2002, 09:30 AM
that's what i mean! thanx alot!
JpEgy
Apr 4th, 2002, 09:56 AM
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?
Jop
Apr 4th, 2002, 10:38 AM
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?
JpEgy
Apr 4th, 2002, 12:58 PM
I found it out alrteady:) . it's like textbox1.copy , .cut , that's what i was looking for, thnx anyway :D
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.