I solve this problem using #region
directives:
#region Menus
private MenuItem mnuFile;
private MenuItem mnuFileNew;
private MenuItem mnuFileOpen;
private MenuItem mnuFileLine1; // A separator.
private MenuItem mnuFileSave;
private MenuItem mnuFileSaveAs;
private MenuItem mnuFileLine2; // Another separator.
private MenuItem mnuFileExit;
#endregion
#region Menu events
#region File
private void mnuFileNew_Click(object sender, System.EventArgs e)
{
}
private void mnuFileOpen_Click(object sender, System.EventArgs e)
{
}
private void mnuFileSave_Click(object sender, System.EventArgs e)
{
}
private void mnuFileSaveAs_Click(object sender, System.EventArgs e)
{
}
private void mnuFileExit_Click(object sender, System.EventArgs e)
{
}
#endregion
#endregion
Since you use Visual Studio, this would hide the menu code, and add more structure to your source file. - Daniël Pelsmaeker
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary. -Shog9