
224 Chapter 6 • Advanced Programming Concepts
In order to inherit or import this form, you need to prefix the form with its
namespace.The following example shows a form inheriting this form.This form
inherits all of the classes of the preceding form (frmDemoNameSpace).The most
relevant part of the preceding code occurs in lines 4 and 20.These lines encapsu-
late the form in a namespace (determined by the programmer):
1 Imports System.ComponentModel
2 Imports System.Drawing
3 Imports System.WinForms
4 Public Class inhForm
5 Inherits haverford.test.example.frmDemoNameSpace
6 Public Sub New()
7 MyBase.New
8 inhForm = Me
'This call is required by the WinForm Designer. ...