ToniArts - New Art of Programming
 
Member Login 
USERNAME

PASSWORD

Not A Member
Click Here
To Sign-Up

What's new?
Links
Delphi tips
Image tips
NT tips
 
 

 

http://www.toniarts.com
hosted by DANIMA Technologies

 

Delphi tips

Clock

This sample needs TTimer and TPanel. Put TTimer's interval value to 100 (1 sec), double click the TTimer, then write: Panel1.Caption := TimeToStr(Time); So the whole application should look something like this:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
TForm1 = class(TForm)
Panel1: TPanel;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
Panel1.Caption := TimeToStr(Time);
end;

end.

More tips coming soon and other Delphi related stuff, like links where to get the best components... And you can always feel free to ask me how to do something with Delphi!

 

Pages by Toni Helenius, ToniArts 2001.
You may copy everything you find in here unless otherwise stated

 
Mainpage What's new? Links Delphi Tips Image Tips NT Yips Products FAQ BETAs ToniArts info
About Me Download Center Message board