Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cut and Paste in VB
Message
 
À
16/04/2000 11:35:10
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00360122
Message ID:
00360221
Vues:
8
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform