A question often seen in the newsgroups is how one should disable the standard clipboard operations such as
Cut/Copy/Paste from a multiline edit box in a windows forms control.
One of the solutions that can be used to prevent the standard clipboard operations is
(as discussed in
http://www.syncfusion.com/FAQ/WinForms/FAQ_c94c.asp#q961q) by:
(1) Disabling the default context menu (which contains the Cut/Copy/Paste menu items) from showing up.
Simply associating an empty ContextMenu with the textbox's ContextMenu property will prevent the default
ContextMenu from showing up.
(2) Override the ProcessCmdKey method in the derived TextBox class to indicate that any shortcut
command keys associated with the clipboard operations have already been processed.
0 comments
Hide comments