, , , , .

! , .

 

Unit*.cpp

 

//

#include <vcl.h> // VCL

#pragma hdrstop //

#include "Unit1.h" //

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm1 *Form1; //

//--------------------------- --------------------------

__fastcall TForm1::TForm1(TComponent* Owner)

: TForm(Owner)

{

}

//

// -,

 

Unit*.h

 

//

#ifndef Unit1H

#define Unit1H

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

//

class TForm1 : public TForm

{

// ,

__published: // IDE-managed Components

TLabel *Label1;

TEdit *Edit1;

TMemo *Memo1;

TButton *Button1;

private: // User declarations

// , ,

public: // User declarations

// , ,

 

__fastcall TForm1(TComponent* Owner);

};

extern PACKAGE TForm1 *Form1;

// ,

#endif

 

Project*.cpp

 

//

#include <vcl.h>

#pragma hdrstop

/* - #pragma . , Project Options. */

//

USEFORM("Unit1.cpp", Form1);

USEFORM("Unit2.cpp", Form2);

//

WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)

{

//

Application->Initialize();

//

Application->CreateForm(__classid(TForm1), &Form1);

Application->CreateForm(__classid(TForm2), &Form2);

//

Application->Run();

}