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: 
At the end of the day this is a personal preference... there are a few things to be sure of though:

1. Be consistent, not just through a file but through an entire project.
2. If you are working on a project with an existing code style then you should use that coding style yourself.
3. You may not get to choose your coding style, depending on the project. Be flexible.
Preference, and it will depend on your business programming structure(if there is one in place). I myself perfer (number 2)

```
private void Test()
{

}

```

You can usually change the IDE to format whichever way you want though.