Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cut and Paste in VB
Message
 
To
16/04/2000 11:35:10
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00360122
Message ID:
00360221
Views:
9
>Hi,
> How could I have uct and paste feature in VB using menu editor and toolbar?

You can use this code:

Private Sub mnuEditCopy_Click()
Clipboard.Clear
If TypeOf Screen.ActiveControl Is TextBox Then
Clipboard.SetText Screen.ActiveControl.SelText
End If
End Sub

Private Sub mnuEditCut_Click()
mnuEditCopy_Click
If TypeOf Screen.ActiveControl Is TextBox Then
Screen.ActiveControl.SelText = ""
End If
End Sub

Private Sub mnuEditPaste_Click()
If TypeOf Screen.ActiveControl Is TextBox Then
Screen.ActiveControl.SelText = Clipboard.GetText()
End If
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform