web analytics

How to disable the right-click context menu and copy & paste in a TextBox?

Options

codeling 1602 - 6666
@2016-01-05 08:09:48

In .NET Framework , a property named ShortcutsEnabled in TextBox is provided to get or set a value indicating whether the defined shortcuts are enabled.

The following shortcut key combinations are defined by default:

  • CTRL+Z
  • CTRL+E
  • CTRL+C
  • CTRL+Y
  • CTRL+X
  • CTRL+BACKSPACE
  • CTRL+V
  • CTRL+DELETE
  • CTRL+A
  • SHIFT+DELETE
  • CTRL+L
  • SHIFT+INSERT
  • CTRL+R

You can override this property to specify other shortcut keys.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com