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