Thema: Nixie-Uhr

Einzelnen Beitrag anzeigen

Benutzerbild von markus5766h
markus5766h

Registriert seit: 5. Mär 2009
Ort: Hamburg
569 Beiträge
 
Delphi XE8 Professional
 
#3

AW: Nixie-Uhr

  Alt 23. Jul 2016, 10:06
Moin.
Die Anzeige verwendet Bitmaps (Ziffern 0 .. 9), die einfach aus einer ImageList aktualisiert werden,
ich häng' die Bitmaps mal im ersten Post dran.

Code:
procedure TfrmMain.ClockTimerTimer(Sender: TObject);
var
  H1, H2, M1, M2, S1, S2 : Byte;
  H, M, S, SS : Word;
begin
  DecodeTime(Now, H, M, S, SS);

  H1 := Trunc(H/10);
  H2 := H-H1*10;
  M1 := Trunc(M/10);
  M2 := M-M1*10;
  S1 := Trunc(S/10);
  S2 := S-S1*10;

  ImageList1.GetBitmap(H1, imgH1.Picture.Bitmap); imgH1.Invalidate;
  ImageList1.GetBitmap(H2, imgH2.Picture.Bitmap); imgH2.Invalidate;
  ImageList1.GetBitmap(M1, imgM1.Picture.Bitmap); imgM1.Invalidate;
  ImageList1.GetBitmap(M2, imgM2.Picture.Bitmap); imgM2.Invalidate;
  ImageList1.GetBitmap(S1, imgS1.Picture.Bitmap); imgS1.Invalidate;
  ImageList1.GetBitmap(S2, imgS2.Picture.Bitmap); imgS2.Invalidate;
end;
Markus H.

Geändert von markus5766h (23. Jul 2016 um 13:34 Uhr)
  Mit Zitat antworten Zitat