Question: I'm creating a settings form that is quite similar to the Visual Studio 2008 "Connect To Database" form in the Server Explorer. 

The settings form is opened as a modal dialog from the parent form as follows:

```
    private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
    {
        var SettingsForm = new frmSettings();
        SettingsForm.ShowDialog(this); 
    }

```

On the SettingsForm, I have a ComboBox that will populate its list with the SQLServer instance names available on the network through the following code in the DropDown event:

```
    private void cboTrackingServerName_DropDown(object sender, EventArgs e)
    {
        DataTable dt = SmoApplication.EnumAvailableSqlServers(false);
        if (dt.Rows.Count > 0)
        {
            cboTrackingServerName.Items.Clear();

            foreach (DataRow row in dt.Rows)
            {
                cboTrackingServerName.Items.Add(
                     row["Server"] + "\\" + row["Instance"]);
            }
        }
    }

```

The problem is that whenever the user clicks the DropDown arrow on the ComboBox, the SettingsForm loses focus to its parent form for a quick second, the SettingsForm appears to redraw itself, and then the SettingsForm regains focus. This also causes the actual DropDown list not to appear until the user clicks it again.

Any helpful thoughts on the matter?

Answer: 
"Preferable" is, of course, subjective, but if all you are interested in is consistency, Microsoft's recommendations are codified in [StyleCop](http://code.msdn.microsoft.com/sourceanalysis), which will automatically check code for you for things like this (and much more). I think it uses style #2, but outdent the braces, for what it is worth.

Assuming this page is accurate, here are some internal style guidelines. Item 2.2 answers your question (they use style #2, but not with the extra indent on the braces)

* <http://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx>
Code conventions are sometimes subjective. You may find that a company strictly imposes code stylings that are different from other companies/people.

To answer:
1. No but CTRL-Z right after you pressed CTRL-K,D (but if you save and close the file, no way back)
2. I don't know about no publication from Microsoft about that subject, but they use that code styling as recommended by VS and in all their code fragments. So that should be **the** recommended version

By the way, I would prefer a space in sample 1: `private void Test() {`