//--------------------------------------------------------------------------- #include #include #pragma hdrstop #include "SplashForm.h" #include "Define.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" Tsplash *splash; //--------------------------------------------------------------------------- __fastcall Tsplash::Tsplash(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall Tsplash::CreateParams(TCreateParams &Params) { TForm::CreateParams(Params); Params.Style &= ~WS_CAPTION; } //--------------------------------------------------------------------------- void __fastcall Tsplash::FormClose(TObject *Sender, TCloseAction &Action) { Action = caFree; } //--------------------------------------------------------------------------- void __fastcall Tsplash::FormCreate(TObject *Sender) { AnsiString str; TRegIniFile *RegIniFile = NULL; RegIniFile = new TRegIniFile(RegFilename); if (RegIniFile) { str = RegIniFile->ReadString("Directory", "Bin", DefaultDir + "\\Bin"); delete RegIniFile; } else str = DefaultDir + "\\Bin"; #if defined(TEXTILE) #if defined(CARPET) str = str + "\\carpet"; #else str = str + "\\textile"; #endif #elif defined(WEAVE) str = str + "\\weave"; #elif defined(KNIT) str = str + "\\knit"; #elif defined(PILE) str = str + "\\pile"; #endif imgSplash->Picture->LoadFromFile(str + "\\splash.bmp"); Height = imgSplash->Picture->Height; Width = imgSplash->Picture->Width; } //---------------------------------------------------------------------------