
custom form control: Cannot view design view of forms that inherit this form
Hmm..... this is occurring in the OnResize event??? Try this line:
If Not Me.mnuEzMain Is Nothing Then Me.Menu = Me.mnuEzMain
--
Happy to help,
-- Tom Spink
Please respond to the newsgroup,
so all can benefit.
One Day,
Quote:
> I am looking at the exception detail & still don't understand what's going
on. I understand that some object does not exist. It
Quote:
> cannot be the form itself because there are numerous references to Me. It
also cannot be the main menu item because at the
Quote:
> beginning of the routine it's instantiated:
> Me.mnuEzMain = New System.Windows.Forms.MainMenu()
> The line that's blowing up:
> Me.Menu = Me.mnuEzMain
> Here's the error:
> System.NullReferenceException: Object reference not set to an instance of
an object.
> at EzFormControls.cEzForm.cEzForm_Resize(Object sender, EventArgs e) in
C:\Omid\VB .NET\Ezware\EzFormControls\cEzForm.vb:line 203
Quote:
> at System.Windows.Forms.Control.OnResize(EventArgs e)
> at System.Windows.Forms.Form.OnResize(EventArgs e)
> at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
> at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32
width, Int32 height, Int32 clientWidth, Int32 clientHeight)
Quote:
> at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32
width, Int32 height)
Quote:
> at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32
width, Int32 height, BoundsSpecified specified)
Quote:
> at System.Windows.Forms.Form.SetBoundsCore(Int32 x, Int32 y, Int32
width, Int32 height, BoundsSpecified specified)
Quote:
> at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32
width, Int32 height, BoundsSpecified specified)
Quote:
> at System.Windows.Forms.Control.set_Size(Size value)
> at System.Windows.Forms.Control.SetClientSizeCore(Int32 x, Int32 y)
> at System.Windows.Forms.Form.SetClientSizeCore(Int32 x, Int32 y)
> at System.Windows.Forms.Control.set_ClientSize(Size value)
> at System.Windows.Forms.Form.set_ClientSize(Size value)
> at System.Windows.Forms.Form.set_Menu(MainMenu value)
> at EzFormControls.cEzForm.InitializeComponent() in C:\Omid\VB
.NET\Ezware\EzFormControls\cEzForm.vb:line 169