-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInfoUnit.cpp
41 lines (38 loc) · 1.31 KB
/
InfoUnit.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "InfoUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
//TInfoForm *InfoForm;
//---------------------------------------------------------------------------
__fastcall TInfoForm::TInfoForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TInfoForm::FormCreate(TObject *Sender)
{
//âûñòàâëÿåì ïîëîæåíèå îêíà ïî öåíòðó
if (Screen->MonitorCount > 1)
{
this->Left = (Screen->Monitors[0]->Width - this->Width) / 2;
this->Top = (Screen->Monitors[0]->Height - this->Height) / 2;
}
else
{
this->Left = (Screen->Width - this->Width) / 2;
this->Top = (Screen->Height - this->Height) / 2;
}
AnsiString s = ExtractFileDir(Application->ExeName) + "\\images\\all_emblems.jpg";
if (FileExists(s))
{
Image1->Picture->LoadFromFile(s);
}
else
{
Image1->Height = 0;
}
}
//---------------------------------------------------------------------------