Question: I am writing sort of instant messanger application in C#, that works on sockets. I managed all socket problems and it works like an IRC now. However, i want to implement private message system. We have 2 forms - one is main, second one is a prototype of like private msg. window should look like. And here is my problem:

```
string priv_windows, who, msg;

```

...

```
public void createform(string who, string msg)
{
Form2 frm = new Form2();
frm.Text = who;
frm.label1.Text = msg;
priv_windows += who += " ";
frm.Show();
}

```

...

```
createform("1st instance", "some text");
createform("2nd instance", "other text");

```

This works just fine for creating new instances of form, however i can't find a way to communicate with these child forms, after creating them. I mean, how can i for example change text on first form instance ?
Is there an easy way, to set an index or something to a specific form instance ? Please, describe shortly how to use it later.

Answer: 
```
public class Form2 : System.Windows.Forms.Form
{
    public System.Windows.Forms.Label label1 = new System.Windows.Forms.Label();

    public void Main(string args[])
    {
        Form2 first = createform("1st instance", "some text");
        Form2 second = createform("2nd instance", "other text");
    }

    public Form2 createform(string who, string msg)
    {
        Form2 frm = new Form2();
        frm.Text = who;
        frm.label1.Text = msg;
        priv_windows += who += " ";
        frm.Show();
        return frm;
    }

    public void SetMessage(string message)
    {
        this.label1.Text = message;
    }
}

```
I recommend using [event aggregator](http://eventaggregator.codeplex.com/) to communicate with objects in your domain.