all groups > dotnet compact framework > june 2006 >
You're in the

dotnet compact framework

group:

Inherited Forms and menus



RE: Inherited Forms and menus Alex Yakhnin [MVP]
6/29/2006 8:29:02 AM
dotnet compact framework: Works for me.

Which version of VS and CF is that?

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


[quoted text, click to view]
Inherited Forms and menus Arthur Dent
6/29/2006 11:02:36 AM
Hello all,

I have a small application which has a base form, and forms inherited from
it.
The base form contains a barcode scanner, and a protected event it raise
when the scanner reads data, and the inherited forms can get the scanner and
catch the event with no problems at all.

My problem comes in, with a mainMenu which i have on the base form, which i
expected to see show up on the inherited form, however, it doesnt. This was
kind of the whole reason why i wanted to use a base form, was so i wouldnt
have to duplicate the same menu on a bunch of forms, with duplicate code.
Why does the menu not show up, is there a reason? Anyone know how to fix
this?

Thanks in advance,
- Arthur Dent.

Re: Inherited Forms and menus Arthur Dent
6/29/2006 11:33:16 AM
VS2005, CF2.

The inherited menu does show up in the component tray at the bottom of the
designer in inherited forms, but it just doesnt render itself on to the
form.

[quoted text, click to view]

Re: Inherited Forms and menus Arthur Dent
6/29/2006 11:46:37 AM
Okay, i figured this out....

I dont know *exactly* what was wrong (as far as the code-behinds) but the
problem was something with how the definitions were made.

Originally, id made my first form, then made the master, then tried to
manually code the first form to inherit from the master. Obviously i missed
something.
I added a new form, and chose "inherited form" from the item type list, and
chose the master form when prompted, and now everything is hooked up
beautifully.

Thanks Alex for your help, though.

Cheerz All,
- Arthur Dent.


[quoted text, click to view]

AddThis Social Bookmark Button