Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

TEXTE TREMBLANT, VIBRATION D'UNE CHAÎNE DE CARACTÈRES


Information sur la source

Catégorie :Graphique Niveau : Débutant Date de création : 18/06/2004 Date de mise à jour : 03/07/2005 19:51:48 Vu / téléchargé: 3 056 / 307

Note :
7,33 / 10 - par 3 personnes
7,33 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (2)
Ajouter un commentaire et/ou une note

Description

Cliquez pour voir la capture en taille normale
C'est un effet de texte avec la fonction Random. Les lettres vibrent dans un bitmap. Un TTimer gère le temps, pas de TThread...

L'intérêt est faible, mais c'est distrayant...
 

Source

  • unit trambtxt;
  • interface
  • uses Windows, SysUtils, Classes, Forms, StdCtrls, ExtCtrls, Graphics, Controls;
  • type
  • TfrTxt = class(TForm)
  • Timer1: TTimer;
  • TxVw: TImage;
  • Label2: TLabel;
  • procedure Timer1Timer(Sender: TObject);
  • procedure FormCreate(Sender: TObject);
  • end;
  • const TT_SPACE = 5 ;
  • Banniere = 'http://altert.family.free.fr/';
  • var frTxt : TfrTxt ;
  • implementation
  • {$R *.DFM}
  • procedure TfrTxt.FormCreate(Sender: TObject);
  • begin
  • Randomize;
  • with TxVw.Picture.Bitmap.Create do
  • begin
  • PixelFormat:=pf4bit;
  • Width:=TxVw.Width;
  • Height:=TxVw.Height;
  • Canvas.Pen.Style:=psClear;
  • Canvas.Brush.Color:=clWhite;
  • Canvas.Brush.Style:=bsSolid;
  • Canvas.Rectangle(-1,-1,TxVw.Width+1,TxVw.Height+1);
  • Canvas.Font.Name:='Times New Roman';
  • Canvas.Font.Style:=[fsBold];
  • Canvas.Font.Size:=28;
  • end;
  • end;
  • procedure TfrTxt.Timer1Timer(Sender: TObject);
  • var i, x : integer;
  • PX, PY : integer;
  • begin
  • TxVw.Picture.Bitmap.Canvas.Brush.Style:=bsSolid;
  • TxVw.Picture.Bitmap.Canvas.Rectangle(-1,-1,TxVw.Width+1,TxVw.Height+1);
  • x:=0;
  • for i:=1 to Length(Banniere) do
  • begin
  • PX:=random(10)+1+x;
  • PY:=random(10)+1;
  • TxVw.Picture.Bitmap.Canvas.Brush.Style:=bsClear;
  • TxVw.Picture.Bitmap.Canvas.TextOut(PX,PY,Banniere[i]);
  • x:=x+TxVw.Picture.Bitmap.Canvas.TextWidth(Banniere[i])+TT_SPACE;
  • end;
  • end;
  • end.
unit trambtxt;
interface
uses Windows, SysUtils, Classes, Forms, StdCtrls, ExtCtrls, Graphics, Controls;
type
  TfrTxt = class(TForm)
    Timer1: TTimer;
    TxVw: TImage;
    Label2: TLabel;
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  end;
const TT_SPACE = 5 ;
      Banniere = 'http://altert.family.free.fr/';
var   frTxt    : TfrTxt ;
implementation
{$R *.DFM}
procedure TfrTxt.FormCreate(Sender: TObject);
begin
  Randomize;
  with TxVw.Picture.Bitmap.Create do
    begin
      PixelFormat:=pf4bit;
      Width:=TxVw.Width;
      Height:=TxVw.Height;
      Canvas.Pen.Style:=psClear;
      Canvas.Brush.Color:=clWhite;
      Canvas.Brush.Style:=bsSolid;
      Canvas.Rectangle(-1,-1,TxVw.Width+1,TxVw.Height+1);
      Canvas.Font.Name:='Times New Roman';
      Canvas.Font.Style:=[fsBold];
      Canvas.Font.Size:=28;
    end;
end;
procedure TfrTxt.Timer1Timer(Sender: TObject);
var i, x    : integer;
    PX, PY  : integer;
begin
  TxVw.Picture.Bitmap.Canvas.Brush.Style:=bsSolid;
  TxVw.Picture.Bitmap.Canvas.Rectangle(-1,-1,TxVw.Width+1,TxVw.Height+1);
  x:=0;
  for i:=1 to Length(Banniere) do
    begin
      PX:=random(10)+1+x;
      PY:=random(10)+1;
      TxVw.Picture.Bitmap.Canvas.Brush.Style:=bsClear;
      TxVw.Picture.Bitmap.Canvas.TextOut(PX,PY,Banniere[i]);
      x:=x+TxVw.Picture.Bitmap.Canvas.TextWidth(Banniere[i])+TT_SPACE;
    end;
end;
end.

Conclusion

Vous pouvez toujours aller voir http://altert.family.free.fr/
 

Fichier Zip

Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip

Historique

03 juillet 2005 19:51:48 :
- Epuration du Zip

Commentaires et avis

signaler à un administrateur
Commentaire de grandvizir le 09/04/2005 12:05:15

Pour être honnête, c'est l'adaptation Delphi de l'applet Java livrée avec le Java 2 SDK. Résultat: juste pour le fun.

signaler à un administrateur
Commentaire de kam_2006 le 15/01/2006 12:31:15

Bonjour frère.

En tout cas mois je la trouve géniale comme source

Ajouter un commentaire



Nos sponsors

Sondage...

CalendriCode

Juillet 2009
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
2728293031  

Consulter la suite du CalendriCode

Comparez les prix Nouvelle version


LG KP501

Entre 9€ et 159€


Photothèque Nouveau !



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,265 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.