Ocena wątku:
- 0 Głosów - 0 Średnio
- 1
- 2
- 3
- 4
- 5
|
[Gotowiec] Budzik
|
| Autor |
Wiadomość |
SenatorOL
Junior Admin

Liczba postów: 304
Dołączył: Dec 2008
Reputacja: 10
€: 666
OS: Windows XP
|
[Gotowiec] Budzik
Na formę wrzucamy następujące elementy:Label1, Label2, Label3, Edit1, Edit2, Edit3
Kod Źródłowy:
Kod:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Timer1: TTimer;
Edit3: TEdit;
Edit2: TEdit;
procedure Timer1Timer(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Timer1Timer(Sender: TObject);
var
A, B, C : String;
begin
A := FormatDateTime('hh', Time);
Label1.Caption := A;
B := FormatDateTime('nn', Time);
Label2.Caption := B;
C := FormatDateTime('ss', Time);
Label3.Caption := C;
if Edit3.Text <> '' then
if Edit2.Text <> '' then
if Edit1.Text <> '' then
if Edit3.Text = C then begin
if Edit2.Text = B then begin
if Edit1.Text = A then begin
MessageDlg('Nadeszła twoja godzina...', mtInformation , [mbOk], 0);
end;
end;
end;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
Label1.Caption := FormatDateTime('hh', Time);
Label2.Caption := FormatDateTime('nn', Time);
Label3.Caption := FormatDateTime('ss', Time);
end;
end.
# Na forum od 13.12.2008
# Moderator od 12.01.2009
# 500 post 15.01.2009
|
|
| 18.01.2009 10:05 |
|
Użytkownicy przeglądający ten wątek: 3 gości