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
|
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
HBITMAP bmp; <--- ne pas oublier
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
String a = Edit1->Text;
Form1->Visible = false;
bmp = LoadImage(Form2->Handle,"C:\\Documents and Settings\\blondelle\\Mes documents\\Mes images\\Massiv10\\Massiv10\\Bitmaps\\Arrow\\arcarrow1.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
Form2->BorderStyle = bsNone;
Form2->Brush->Handle = CreatePatternBrush(bmp);
// Animation de la fenêtre
AnimateWindow(Form2->Handle, 10000, StrToInt(a));
Form1->Visible = true;
}
//---------------------------------------------------------------------------
/*
AnimateWindow(Form1.Handle, 1000, AW_HOR_POSITIVE or AW_HOR_NEGATIVE or AW_Hide);
AnimateWindow(Form1.Handle, 1000, AW_HOR_POSITIVE or AW_HOR_NEGATIVE or AW_CENTER);
AnimateWindow(Form1.Handle, 1000, AW_HOR_NEGATIVE or AW_HOR_POSITIVE or AW_Hide);
AnimateWindow(Form1.Handle, 1000, AW_HOR_POSITIVE or AW_HOR_NEGATIVE or AW_SLIDE);
AnimateWindow(Form1.Handle, 1000, AW_VER_POSITIVE or AW_HIde);
AnimateWindow(Form1.Handle, 1000, AW_VER_NEGATIVE or AW_SLIDE);
AW_ACTIVATE|AW_BLEND
SW_MAX or AW_HIDE
*/ |
Partager