The Winamp Remote Control suite
a remote control client and plugin for Winamp 2.x, 5.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
messageF.cpp
Go to the documentation of this file.
1 /*
2 winamp remote control suite �Patrick Michael Martin 2000, 2001, 2002
3 
4 Copyright (C) 2000,2001,2002 Patrick M. Martin
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 Patrick M. Martin may be reached by email at patrickmmartin@gmail.com.
21 */
22 
23 #include <vcl.h>
24 #pragma hdrstop
25 
26 #include "messageF.h"
27 #include "ColourU.h"
28 
29 #pragma package(smart_init)
30 #pragma resource "*.dfm"
31 
32 
33 
35 
36 const TRect FinalSize = TRect(0, 0, 350, 150);
37 
38 float startcount = 0;
39 
40 __fastcall TfrmMessage::TfrmMessage(TComponent* Owner)
41  : TForm(Owner)
42 {
43 }
44 
45 
46 
47 void __fastcall TfrmMessage::FormShow(TObject *)
48 {
49  tmrAnimate->Enabled = true;
50  StartCount = GetTickCount();
51 }
52 
53 void __fastcall TfrmMessage::tmrAnimateTimer(TObject *)
54 {
55 //
56 
57  int TicksCount = GetTickCount() - StartCount;
58  memTitle->Font->Color = rainbowColour(TicksCount);
59  if (TicksCount > 3000)
60  {
61  tmrAnimate->Enabled = false;
62  Close();
63  }
64 }
65 
66 void __fastcall TfrmMessage::FormActivate(TObject *)
67 {
68 //
69 }
70 
71 
72 
73 
74