卷起千堆雪tyn 的程序,偶没实验,仅仅是收集起来了。[
]
const
DisplayText = '卷起千堆雪tyn';
var
do
ne : Boolean;
procedure TForm1.Button2Click(Sender: TObject);
var
I :Integer;
Bitmap :TBitmap;
begin
Bitmap := TBitmap.Create;
Bitmap.Width := Width;
Bitmap.Height := 40;
Bitmap.Canvas.Font.Name := 'Arial Bold';
Bitmap.Canvas.Font.Size := 16;
Bitmap.Canvas.Brush.Color := clSilver;
Bitmap.Canvas.FillRect(Rect(0, 0, Width, 40));
do
ne := False;
while notdo
nedo
begin
for I := -Bitmap.Canvas.TextWidth(DisplayText)
to Pred(Width)do
begin
Application.ProcessMessages;
if (Done) then
Break;
Sleep(10);
Bitmap.Canvas.Font.Color := clGray;
Bitmap.Canvas.Brush.Style := bsClear;
Bitmap.Canvas.TextOut(2, 12, DisplayText);
Bitmap.Canvas.Font.Color := clBlack;
Bitmap.Canvas.Brush.Style := bsClear;
Bitmap.Canvas.TextOut(0, 10, DisplayText);
Canvas.Draw(I, 0, Bitmap);
end;
end;
Bitmap.Free;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
do
ne := True;
end;