Home All Groups Group Topic Archive Search About

Disable a Textbox default context menu

Author
30 May 2010 7:44 PM
Roidy
How do I disable the default contextmenu on a Textbox? I want a user to be
able to right click a textbox and have an action happen but even if I set
the contextmenustrip property for the textbox to (none) I still get the
default copy/paste menu, how do I completely disable it.

Thanks
Robert

Author
30 May 2010 7:59 PM
Herfried K. Wagner [MVP]
Am 30.05.2010 21:44, schrieb Roidy:
> How do I disable the default contextmenu on a Textbox?

\\\
Me.TextBox1.ContextMenu = New ContextMenu()
///

--
  M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
30 May 2010 9:25 PM
Roidy
Excellent, Thanks very much.

Robert

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:u2rKMKDALHA.3840@TK2MSFTNGP02.phx.gbl...
> Am 30.05.2010 21:44, schrieb Roidy:
>> How do I disable the default contextmenu on a Textbox?
>
> \\\
> Me.TextBox1.ContextMenu = New ContextMenu()
> ///
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>