NullReferenceException using MergeMenu MDI child form

R

Rob

Hi all, has anyone confirmed the possible NullReferenceException bug
when creating child forms that have their own menu in an MDI
application.

I have been experimenting with the Scribble sample app and have found
that if you reduce the menu structure to File, Pen, Window, Help and
add the Edit menu to the child form: ScribbleView, then everything
works ok, but as soon as I remove the Pen menu, I can only create 3
new child forms at runtime before the NullReferenceException occurs.

I know other people have had similar experiences and get the
impression that the automatic menu merging between child and mdi forms
is rather unstable. Has anyone else had problems with creating mdi
child forms with their own menus that get merged into the mdi main
form's menu at runtime? And is there any solutions, workarounds? I
haven't seen any definite solutions posted yet.

Perhaps this is only a problem when there are 3 menus on the parent
form and 1 menu on the child form and I am trying to insert the child
menu in between the first and second menu on the main mdi form. All my
menu items have merge type of MergeItems.

I am using WinXp sp1, .net framework 1.1 VS.Net 2003. Language = C#

Thanks for any info.
Rob.
 
R

Rob

After some further investigation, I get the impression that the
NullReferenceException is only occuring when running the app from
Visual Studio. If I run the app from the Release or Debug folder in
explorer, then everything seems ok. Weird. I just got memory profiler,
so may do some further investigation as to what's happening with the
mdi child/parent automatic menu merge.

Rob.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top