Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I implements an Edit Menu ?
Message
 
To
04/05/2001 14:50:13
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00503710
Message ID:
00503910
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform