Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I implements an Edit Menu ?
Message
 
À
04/05/2001 14:50:13
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00503710
Message ID:
00503910
Vues:
16
>I know that it is really easy to incorporate the edit menu in a VFP apps., but I search in MSDN how to implements the same thing in VB and I didn't find it !
>
>I want to have the familiar options like "Copy, Cut, Paste, Undo, Redo, Find, Replace, ...".
>
>Did someone have an example of code that I can use in my VB menu ?

All these options needs top be implemented manually. Here is the code for Copy, Cut and Paste.
    Select Case Index
        Case 1  'Couper
            Clipboard.Clear
            If TypeOf Screen.ActiveControl Is TextBox Then
                Clipboard.SetText Screen.ActiveControl.SelText
                Screen.ActiveControl.SelText = ""
            End If
        Case 2  'Copier
            Clipboard.Clear
            If TypeOf Screen.ActiveControl Is TextBox Then
                Clipboard.SetText Screen.ActiveControl.SelText
            End If
        Case 3  'Coller
            If TypeOf Screen.ActiveControl Is TextBox Then
                Screen.ActiveControl.SelText = Clipboard.GetText()
            End If
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform