Set the Browsable attribute on the new property that hides the existing one. Here is a code snippet that hides the WordWrap property in the derived TextBox.
[C#]
public class CustomTextBox : TextBox
{
[ Browsable( false ) ]
public new bool WordWrap
{
get { return false; } // always false
set{}
}
}
[Visual Basic]
Public Class MyTextBox
Inherits TextBox
<Browsable(False)> _
Public Shadows Property WordWrap() As Boolean
Get
Return False ' always false
End Get
Set ' empty
End Set
End Property
End Class
Contributed from George Shepherd's Windows Forms FAQ