Hello, I'm learning how to use WinForms Designer in VS2005. I've noticed that it is quite capricious, when I change whitespaces, newlines, etc (things that are not strict in language standards)the way I like them to be. For example, when I remove blank line after constructor/destructor, it gives errors and doesn't show anything at all. And when I make my manual"legal" refactoring, it puts new form'sevent methods in some weird places. Take a look at this:

Code Block

#pragma once

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

namespace fmd
{
///
/// Summary for Form1
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
///
public ref class frmMainForm : public System::Windows::Forms::Form
{
public:
frmMainForm(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
private: System::Void tsmiShutDown_Click(System::Object^ sender, System::EventArgs^ e) {

//FORM DESIGNER PUTS CODE HEREAFTER I DOUBLECLICK ON MENU ITEM :(
}
}

protected:
///
/// Clean up any resources being used.
///
~frmMainForm()
{
if (components)
{
delete components;
}
}

private: System::Windows::Forms::MenuStrip^ msMain;

I'm using spaces for identing, not tabs.Hope that it is not illegal here.

How to make form designer put code in theright place?