Well there must be a better way to do it than this, but here goes.
Drop a new context menu onto the form, and leave it as having no items.
Then set the text box's context menu property to be the empty one you just created.
At run time, nothing happens when you right click.
Protected Overrides Sub WndProc(ByRef m As
System.Windows.Forms.Message)
If m.Msg = &H204 Then ' WM_RBUTTONDOWN
Return 'ignore it
End If
MyBase.WndProc(m)
End Sub 'WndProc
End Class 'MyTextBox Regards,
Russ
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.