-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainintro.cpp
64 lines (52 loc) · 1.56 KB
/
mainintro.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mainintro.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tintro *intro;
//---------------------------------------------------------------------------
__fastcall Tintro::Tintro(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tintro::FormActivate(TObject *Sender)
{
static bool show = true;
if(show) {
MediaPlayer1->FileName = "intro.avi";
MediaPlayer1->Open();
intro->Left = 0;
intro->Top = 0;
intro->Width = Screen->Width;
intro->Height = Screen->Height;
MediaPlayer1->DisplayRect = Rect(0, 0, intro->Width, intro->Height);
MediaPlayer1->Play();
Timer1->Enabled = true;
show = false;
}
}
//---------------------------------------------------------------------------
void __fastcall Tintro::FormKeyPress(TObject *Sender, char &Key)
{
//MediaPlayer1->Stop();
MediaPlayer1->Close();
intro->Close();
}
//---------------------------------------------------------------------------
void __fastcall Tintro::FormClick(TObject *Sender)
{
//MediaPlayer1->Stop();
MediaPlayer1->Close();
intro->Close();
}
//---------------------------------------------------------------------------
void __fastcall Tintro::Timer1Timer(TObject *Sender)
{
//MediaPlayer1->Stop();
MediaPlayer1->Close();
intro->Close();
}
//---------------------------------------------------------------------------