We help IT Professionals succeed at work.
Get Started

How to create an event out of a class that is caught by other forms?

Ahmet Ekrem SABAN
Last Modified: 2012-05-12

I am new to C# and .NET. My question is simple to formulate, but I do not know whether there is a simple answer. I have created the GUI for a WinForms project, where there are a number of forms that all derive from a class BaseForm : Form. This class is only used to derive other classes from it, although it is not an abstract class - wanted to open it in the MVS2010 design editor, which is not possible for abstract classes...

The BaseForm does have a singleton class called ButtonMenu in it. My question is about the interaction over event handling between the ButtonMenu and all BaseForm-derived forms.

When the "language" button is pressed in the ButtonMenu, all the texts of the buttons are switched from one language to the next. How can I inform the active form/all the forms that this button was clicked?

What I want to do is to change the text content in the active form. Note that the class ButtonMenu is a Control and not related to any Form class.

Thank you for your reply.
Watch Question
Development, GIS Consultant - Haram Presidency
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE