Menu forms

B

B

Hi,

In a Windows application, I can create a base form with
a menu and then inherit from this form when I create other
forms.
When I do this for a Pocket PC application I get many
errors when I build this.

How are you guys creating a single menu and using it
across multiple forms??? I am looking for ideas or any
idiomatic solutions to this problem.

thanks in advance
 
C

chris-s

There are some work arounds to get visual inheritance to work, but I'm not
really sure what is involved, search the newsgroups for this.

They way I handled having the same menu across different forms was to create
a class that actually creates the menu structure, then call this each time a
form is created. I basically created a form with a mainmenu, added all the
detail, then cut the auto-generated code for it out and used it to create a
menu creation class. It works well, although there was a problem with it not
liking to create separator bars for some reason.

I did try playing around with the idea of copying a menu structure, the idea
being that I would create just one instance of a mainmenu, then write a
function to copy it's structure etc to a new one, but there were issues with
this.

Chris
 
H

Hollywood

I did something similiar to the "cut the auto-generated code", but I
encapsulated it in a root class which I then store in an application session
api that I use (similiar to an ASP session to some degree). This way any
form I have can ask the session for the menu object and attach it to the
form. The menu object then knows how to handle all the events raised by the
menu.
 

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