segunda-feira, 11 de janeiro de 2021

C++ builder - números dançantes


Fizemos um tratado, que seria, aproveitar
o dia de folga, com muita paciência,
aplicar conhecimentos e determinação.
mas umas boas goolgadas se fez necessário,
e o resultado é este apresentado aqui no vídeo,
mas sei que isto não tem lá muitas utilidades,
mas nos ajudou muito a adquirir mais experiência
com o C++ Builder em aplicações de interface gráfica.
Se quiserem algumas dicas de como fazer isto posso passar,
o .exe também posso passar, porém o código
me deu muito trabalho para criar.


//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate ( TObject *Sender ) {
   Label_Manual ( Sender );
   Label2 -> Caption = " ";
   Label2 -> Caption = Label2 -> Caption + "0";

   for ( int i = 0; i < 24; i++ ) {
  Image1 [ i ] = new TImage ( this );
  Image1 [ i ] -> Parent = Form1;
  Image1 [ i ] -> Picture -> LoadFromFile ("Bal.bmp");
  Image1 [ i ] -> Visible = true;
  Image1 [ i ] -> Width = 31;
  Image1 [ i ] -> Height = 31;

  Label1 [ i ] = new TLabel ( this );
  Label1 [ i ] -> Parent = Form1;
  Label1 [ i ] -> Visible = true;
  Label1 [ i ] -> Font -> Name = "Alarm clock";
  Label1 [ i ] -> Font -> Size = 12;
  Label1 [ i ] -> Font-> Style = TFontStyles ( ) << fsBold;
  Label1 [ i ] -> Font -> Color = clBlack;
  if ( i >= 0 && i < 10 ) {
Label1 [ i ] -> Caption = "0";
  }
  Label1 [ i ] -> Caption = Label1 [ i ] -> Caption + StrToInt ( i );
   }
   Embaralha ( );
   Bitimap_Circular ( );
}
//---------------------------------------------------------------------------

SENTIU FALTA DE ALGUNS CÓDIGOS?

Nenhum comentário:

Postar um comentário

Observação: somente um membro deste blog pode postar um comentário.