I have asked the question "Is there something like master page in desktop applications?" Now I am in position that I have to extend the question. Thanks for understanding.

I have add one MDI master form into my project and several inherited forms that inherit MDI master one. I was using this code.

```
private void searchToolStripMenuItem_Click(object sender, EventArgs e)
{
    foreach (Form child in this.MdiChildren)
    {
       child.Close();
    }   

    Search childSearchForm = new Search();
    childSearchForm.MdiParent = this;
    childSearchForm.Text = "Search ";
    childSearchForm.Show();            
}

```

This code is triggered when I press some button on master form and the new in this case Search form is opened inside master.

Now my question is the right way to build desktop applications or there is some other more elegant way where content of user interface can be dynamic and switch from view to view by clicking on the buttons inside. For instance clicking on "Search" button on some search form will take you to search results grid, all that happening in one master form.

And if this is right way (which I doubt) how can I achieve to open other inside forms by clicking on buttons inside them. Also if I put some controls on masterpage they will appear two times in master form and in inherited form.

Thanks.

PS

I am using Visual Studio 2008 and MS SQL 2005.