Re: [2005] Inherited Forms
You'd have to shadow the Text property so that it did not set the corresponding base property.
VB Code:
Public Class BaseForm
Inherits Form
'Hide the base Text behind a read-only property so it cannot be set.
'Also, don't show it in the Properties window.
<Browsable(False)> _
Public Shadows ReadOnly Property Text() As String
Get
Return MyBase.Text
End Get
End Property
Public Sub New()
'...
MyBase.Text = "This Title Cannot Be Changed"
End Sub
End Class
Note though that because the base property is not declared Overridable you must declare the new property Shadows, which means that if the caller casts it as type Form they will be able to change the Text property and there is no way around that.