在form2做下面紅字的設定
//---------------------------------------------------------------------------
// Unit2.h #ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include
#include
#include
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published: // IDE-managed Components
private: // User declarations
public: // User declarations
__fastcall TForm2(TComponent* Owner); virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Unit2.cpp
//--------------------------------------------------------------------------- #include
#pragma hdrstop #include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------- void __fastcall TForm2::CreateParams(Controls::TCreateParams &Params)
{
TForm::CreateParams(Params); Params.WndParent = 0;
}