Solved

C# -- MenuStrip (Reusing on Form2)

Posted on 2009-07-15
3
899 Views
Last Modified: 2013-12-17
I created a new WindowsAPP, dropped a "MenuStrip" onto Form1, and changed it to have the buttons I needed.

How can I reuse this same "MenuStrip" on Form2, Form4, etc ?
0
Comment
Question by:finance_teacher
  • 2
3 Comments
 
LVL 1

Expert Comment

by:mattyg_mb
Comment Utility
Using the form designer click the menu strip copy it (ctrl-c). Then paste (ctrl-v) onto the other forms. Note that this only captures the UI though, the code is not transferred to the new form.
0
 

Author Comment

by:finance_teacher
Comment Utility
Doing a "copy/paste" requires me to "re-copy/paste" onto 50+ forms every time I make a change to the menuStrip.

Do you have a better way ?

0
 
LVL 1

Accepted Solution

by:
mattyg_mb earned 500 total points
Comment Utility
If the behavior is always the same, then putting it into a User Control should work well. You just update the one control, and the changes are replicated when you rebuild the application. This control can be selected from your toolbox and added to all of your forms.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now