---
title: "Creating Event for Multiple Forms"  
description: "Creating Event for Multiple Forms"  
author: "Anonymous User"  
published: 2014-01-30  
updated: 2014-01-30  
canonical: https://www.mindstick.com/forum/1926/creating-event-for-multiple-forms  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Creating Event for Multiple Forms

I have tried a bunch of different things, so obviously I am [now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) stuck... I have created a [form](https://www.mindstick.com/forum/6/multi-form-mfc-application), it has a [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) on it - that when clicked creates a new form. I can [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) away and create [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) [forms](https://www.mindstick.com/interview/34192/what-is-the-purpose-of-the-authentication-mode-forms-element-in-web-config) this way. What I would like and cannot get to work is to have the main form have a [second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) button on it - that when clicked will change all of the [background](https://www.mindstick.com/articles/65/how-to-change-background-color-of-tab-control-in-c-sharp) [colors](https://answers.mindstick.com/qa/31019/should-i-paint-my-interior-with-neutral-or-bright-colors) on the [secondary](https://answers.mindstick.com/qa/40407/who-has-been-appointed-as-the-chairperson-of-central-board-of-secondary-education-cbse-replacing-rajesh-kumar-chaturvedi) forms.

## Replies

### Reply by Pravesh Singh

Hi Samuel,

In your parent form do something like this.

```
private event Action<Color> ChangeColor;private void CreateAndShowForm(){    var form2 = new Form2();    ChangeColor +=form2.changeColor;    /*do other stuff to show form*/}private void button1_Click(object sender, EventArgs e){   
ChangeColor(Color.Red);}In the child formspublic void changeColor(Color obj){    /*change background color*/}
```


---

Original Source: https://www.mindstick.com/forum/1926/creating-event-for-multiple-forms

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
