Unit1.cpp
上传用户:lhxd_sz
上传日期:2014-10-02
资源大小:38814k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit1.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- Icon1=new TIcon();
- Icon1->LoadFromFile("icon1.ico");
- Icon2=new TIcon();
- Icon2->LoadFromFile("icon2.ico");
- Icon3=new TIcon();
- Icon3->LoadFromFile("icon3.ico");
- Icon4=new TIcon();
- Icon4->LoadFromFile("icon4.ico");
- IconNN=0;
- }
- //---------------------------------------------------------------------------
- __fastcall TForm1::~TForm1()
- {
- delete Icon1;
- delete Icon2;
- delete Icon3;
- delete Icon4;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Timer1Timer(TObject *Sender)
- {
- if(IconNN==0)
- {
- Icon=Icon1;
- IconNN=1;
- }
- else if(IconNN==1)
- {
- Icon=Icon2;
- IconNN=2;
- }
- else if(IconNN==2)
- {
- Icon=Icon3;
- IconNN=3;
- }
- else if(IconNN==3)
- {
- Icon=Icon4;
- IconNN=0;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- Close();
- }
- //---------------------------------------------------------------------------