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 ?

5 Years
Discussion Span
Last Post by mike2098

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.



Edited by samson_zed: n/a


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)


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.