Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy & Paste
Message
 
À
19/02/2003 20:42:58
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Divers
Thread ID:
00755301
Message ID:
00755332
Vues:
13
I hope you have a menu on your form in which you have Copy and Paste items having the appropriate shortcut.

Then you need this code:
'Cut
            Clipboard.Clear
            If TypeOf Screen.ActiveControl Is TextBox Then
                Clipboard.SetText Screen.ActiveControl.SelText
                Screen.ActiveControl.SelText = ""
            End If
'Copy
            Clipboard.Clear
            If TypeOf Screen.ActiveControl Is TextBox Then
                Clipboard.SetText Screen.ActiveControl.SelText
            End If
'Paste
            If TypeOf Screen.ActiveControl Is TextBox Then
                Screen.ActiveControl.SelText = Clipboard.GetText()
            End If
>Hi,
>
>May i ask one silly question? how to allow the application using CTRL+C and CTRL+V to doing the text copy and paste? it just like we are using this kind of hot key in MSWord.
>
>Thanks
>Aston
É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