Unit1.cpp
上传用户:cqslgg
上传日期:2009-12-10
资源大小:128k
文件大小:2k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit1.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Image1Click(TObject *Sender)
- {
- int inty;
- TRect myrect;
- stoploop=false;
- do{
- inty = Image1->ClientHeight;
- myrect.Left=0;
- myrect.Top=0;
- myrect.Right=Image1->Width;
- myrect.Bottom =Image1->Height ;
- if(stoploop)break;
- do{
- Application->ProcessMessages();
- if(stoploop)break;
- inty--;
- Image1->Canvas->Brush->Color = clBlack;
- Image1->Canvas->FillRect(myrect);
- Image1->Canvas->Font->Size = 15 ;
- Image1->Canvas->Font->Color =clAqua;
- Image1->Canvas->TextOut(0,inty," 亲爱的李岩");
- Image1->Canvas->Font->Size = 13;
- Image1->Canvas->Font->Color =clLime;
- Image1->Canvas->TextOut(0,inty+30," 想念你的每一刻,想念你的每一分");
- Image1->Canvas->TextOut(0,inty+55," 想念你的每一秒,都让我如此激动,我是");
- Image1->Canvas->TextOut(0,inty+80," 如此的想和你一起进行烂漫的烛光晚餐!");
- Image1->Canvas->TextOut(0,inty+105," 我不知道如何向你发出邀请,所以出此下策");
- Image1->Canvas->TextOut(0,inty+130," 这代表了我对你的一片真心-永远爱你!!") ;
- Image1->Canvas->Font->Size=10;
- Image1->Canvas->Font->Color= clBtnFace;
- Image1->Canvas->TextOut(0,inty+160," COPYRIGHT Jason 2000");
- if(inty <-170) break ;
- BitBlt(Image1->Canvas->Handle , 1, 1, Image1->Width, Image1->Height, Image1->Canvas->Handle , 0, 0, SRCCOPY ) ;
- Sleep(30);}
- while(!stoploop);
- }
- while(!stoploop);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
- {
- stoploop=true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormHide(TObject *Sender)
- {
- stoploop=true;
- }
- //---------------------------------------------------------------------------