Unit1.cpp
上传用户:cqslgg
上传日期:2009-12-10
资源大小:128k
文件大小:2k
源码类别:

Delphi/CppBuilder

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "Unit1.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. //---------------------------------------------------------------------------
  10. __fastcall TForm1::TForm1(TComponent* Owner)
  11.         : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TForm1::Image1Click(TObject *Sender)
  16. {
  17.  int inty;
  18. TRect myrect;
  19. stoploop=false;
  20. do{
  21.  inty = Image1->ClientHeight;
  22.  myrect.Left=0;
  23.  myrect.Top=0;
  24.  myrect.Right=Image1->Width;
  25.  myrect.Bottom =Image1->Height ;
  26.  if(stoploop)break;
  27.   do{
  28.   Application->ProcessMessages();
  29.   if(stoploop)break;
  30.   inty--;
  31.   Image1->Canvas->Brush->Color = clBlack;
  32.   Image1->Canvas->FillRect(myrect);
  33.   Image1->Canvas->Font->Size = 15 ;
  34.   Image1->Canvas->Font->Color =clAqua;
  35.   Image1->Canvas->TextOut(0,inty,"                      亲爱的李岩");
  36.   Image1->Canvas->Font->Size = 13;
  37.   Image1->Canvas->Font->Color =clLime;
  38.   Image1->Canvas->TextOut(0,inty+30,"           想念你的每一刻,想念你的每一分");
  39.   Image1->Canvas->TextOut(0,inty+55,"       想念你的每一秒,都让我如此激动,我是");
  40.   Image1->Canvas->TextOut(0,inty+80,"       如此的想和你一起进行烂漫的烛光晚餐!");
  41.   Image1->Canvas->TextOut(0,inty+105,"      我不知道如何向你发出邀请,所以出此下策");
  42.   Image1->Canvas->TextOut(0,inty+130,"      这代表了我对你的一片真心-永远爱你!!") ;
  43.   Image1->Canvas->Font->Size=10;
  44.   Image1->Canvas->Font->Color= clBtnFace;
  45.   Image1->Canvas->TextOut(0,inty+160,"                      COPYRIGHT Jason 2000");
  46.   if(inty <-170) break ;
  47.   BitBlt(Image1->Canvas->Handle , 1, 1, Image1->Width, Image1->Height, Image1->Canvas->Handle , 0, 0, SRCCOPY ) ;
  48.   Sleep(30);}
  49.   while(!stoploop);
  50.   }
  51. while(!stoploop);
  52. }
  53. //---------------------------------------------------------------------------
  54. void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
  55. {
  56. stoploop=true;
  57. }
  58. //---------------------------------------------------------------------------
  59. void __fastcall TForm1::FormHide(TObject *Sender)
  60. {
  61. stoploop=true; 
  62. }
  63. //---------------------------------------------------------------------------