Brian,
I just noticed that. In order to get around this, you can get the
hosted TextBox by calling the TextBox property. Then, you should be able to
create a class derived from NativeWindow which overrides the WndProc method
to ignore the context menu message.
When you get the textbox property, get the handle, and assign the handle
to your overridden NativeWindow class.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Brian Keating said:
Hi Nicholas,
I tried to take this approack by not handling the WM_CONTEXTMENU = 0x007b;
in the WndProc but...
ToolStripTextBox doesn not derive from control. so there is no wndproc,
So i tried to do it with the ToolStrip itself but to no affect.
I'll figure it out somehow when i get back to it and i'll post the
solution.
thanks
Brian
Nicholas Paldino said:
Brian,
In order to do this, you would have to disable the right click
functionality of the toolbox, I believe. You can derive from TextBox,
and
then override the WndProc method to intercept the WM_RBUTTONDOWN
notification.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
hi there,
does anyone know how to prevent the context menu on a ToolStripText box
from
appearing?
when i right click on the toolstriptextbox i get presented with the
system
undo
------
cut
copy
paste
-----
delete
context menu, i need to disable this menu showing.
any ideas?