Re: ToolStripTextBox right click
- From: "Brian Keating" <BrianKeating@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 3 Nov 2005 01:06:03 -0800
Hi Nicholas, excellen, u def deserve the MVP!
I didn't know about the TextBox property, thanks alot, i'm home free now.
regds
Brian
"Nicholas Paldino [.NET/C# MVP]" wrote:
> 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]
> - mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> "Brian Keating" <BrianKeating@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:B97E795B-ACD3-412D-B887-973DF4303F26@xxxxxxxxxxxxxxxx
> > 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 [.NET/C# MVP]" wrote:
> >
> >> 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]
> >> - mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> >>
> >> "Brian Keating" <BrianKeating@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:1B5CD9C0-A072-4477-9D23-4B69A92EC64B@xxxxxxxxxxxxxxxx
> >> > 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?
> >>
> >>
> >>
>
>
>
.
- Prev by Date: Re: How to return a value when BeginInvoke is used?
- Next by Date: Re: Memory Problem Again
- Previous by thread: decrypt des ede3?
- Next by thread: why can't vs 2005 class designer do UML
- Index(es):