>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