Hello All,
I have created a base form (frmMDIChild) from which I would like to
inherit all future forms from.
The base form has 3 properties which I would like to enforce on all
forms which inherit from the base form.
Me.Icon = CType(resources.GetObject("$this.Icon"),
System.Drawing.Icon)
Me.MinimizeBox = False
Me.ShowInTaskbar = False
I would like to make so that the forms which inherit from my base form
can not change these properties.
Thanks in advance for your help.
HJ
Below is the code for my base class
-----------------------------------------------------------------------------
Public MustInherit Class frmMDIChild
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(frmMDIChild))
'
'frmMDIChild
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(384, 302)
Me.Icon = CType(resources.GetObject("$this.Icon"),
System.Drawing.Icon)
Me.MinimizeBox = False
Me.ShowInTaskbar = False
Me.Name = "frmMDIChild"
Me.Text = "frmMDIChild"
End Sub
#End Region
End Class
-----------------------------------------------------------------------------
|