how do you disable the ctrl-C/ctrl-V in vb.net

In my vb.net application I need to disable the cntrl c (copy) and cntrl v (paste) in the richtextbox.
mk8guyAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
If you are really using VB.Net 2005, then just set the RTB.ShortcutsEnabled property to False:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.textboxbase.shortcutsenabled.aspx

        RichTextBox1.ShortcutsEnabled = False
0
 
456838Commented:
may try

protected overrides sub wndproc(byref m as System.Windows.Forms.Message)
const WM_COPY = &H301
const WM_CUT = &H300
'filter messages
select case m.Msg
case WM_COPY, WM_CUT
MsgBox("u cant do this")
case else
mybase.wndproc(m)
end select
end sub

or anothe reference for you

http://www.codeguru.com/forum/showthread.php?t=298837

http://www.developerfood.com/can-t-ctrl-c-and-richtextbox/microsoft-public-vb-general-discussion/f103577a-c212-410c-b1f8-0a21483b3691/article.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.