Hi I have a number of forms which have a common menu strip rather than copy the control onto each additional form is it possible to just call the menu from another form ?

Hi Mikejs

I prefer MDImain windows form which is your main parent form whereas declare other forms with their MDIparent as your main form

For example,
Form2.Mdiparent = form1 '-- say

you can change ur dockstyle also if u need
Form2.dock = DockStyle.Fill

Take for example the MSPaint application, There will be one mainform which has the menu strip, whenever u open a new *.Bmp file a new form opens with the unique set of instruction.. This way u can create multiple forms which has unique set of operations also having common event handlers like menubars, contextmenustrip, toolstrip, statusstrip etc.


Rgrds

Sam

I don't know if its possible to literally call over the menu strip control. but if you create a module called MenuStrip you can add your code into it which can then be called from different forms. so you would have to create a new menu strip for each form but would only have to write the code once.

Thanks for the responces I was using multiple panels but its getting very tiedious if I need to make edits, so I am going to go with a main form and load new forms with basic control bar (the main control will remain open untill system is closed)

M

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.