المشاركات : 418
المواضيع 50
:
: 0
الإنتساب : Sep 2009
الملفات المرفقة
time deferences.7z (الحجم : 298.29 ك ب / التحميلات : 53)
المشاركات : 61
المواضيع 22
:
: 19
الإنتساب : Dec 2009
عندك الحق خاصة اليومين الاخريين
المهم انتظر منك البرنامج اليوم ولله مستعجل اخي الكريم
المشاركات : 418
المواضيع 50
:
: 0
الإنتساب : Sep 2009
للفائدة فقظ مثال رائع
كود :
unit NP;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ShellApi, XpMan;
type
TMainFrm = class(TForm)
Time: TLabel;
Working: TLabel;
T: TTimer;
lb: TLabel;
tx7: TLabel;
procedure TTimer(Sender: TObject);
procedure lbClick(Sender: TObject);
private
public
end;
var
MainFrm: TMainFrm;
implementation
{$R *.dfm}
function IntToStr(I: Longint): String;
var
S: string[11];
begin
Str(I, S);
IntToStr := S;
end;
procedure TMainFrm.TTimer(Sender: TObject);
var
count, days, min, hours, seconds: Longint;
begin
count := GetTickCount();
count := count div 1000;
days := count div (24 * 3600);
If days > 0 Then
count := count - (24 * 3600 * days);
hours := count div 3600;
If hours > 0 Then
count := count - (3600 * hours);
min := count div 60;
seconds := count Mod 60;
Time.caption := IntToStr(days) + ' Days ' + IntToStr(hours) + ' hours ' +
IntToStr(min) + ' minutes ' + IntToStr(seconds) + ' seconds ';
end;
كود :
unit NP;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, XpMan, ShellApi;
type
TMainFrm = class(TForm)
Timer: TTimer;
tx1: TLabel;
tx2: TLabel;
tx3: TLabel;
tx4: TLabel;
tx5: TLabel;
tx6: TLabel;
tx7: TLabel;
tx8: TLabel;
tx9: TLabel;
tx10: TLabel;
tx12: TLabel;
tx11: TLabel;
procedure TimerTimer(Sender: TObject);
procedure tx12Click(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainFrm: TMainFrm;
implementation
{$R *.dfm}
procedure TMainFrm.TimerTimer(Sender: TObject);
begin
tx1.Caption := FormatDateTime('hh:mm:ss', time());
tx2.Caption := DateToStr(Now);
tx3.Caption := FormatDateTime('dddd', date());
tx4.Caption := FormatDateTime('am/pm', time());
tx5.Caption := FormatDateTime('dd', date());
tx6.Caption := FormatDateTime('dddd', date());
tx7.Caption := FormatDateTime('ddd', date());
tx8.Caption := FormatDateTime('zzz', time());
tx9.Caption := FormatDateTime('nn:ss', time());
tx10.Caption := FormatDateTime('tt', time()) + #$A#$D ;
ShowMessage( FormatDateTime('am/pm', time()) + #$A#$D +
FormatDateTime('ampm', time()) + #$A#$D +
FormatDateTime('a/p', time()) + #$A#$D +
FormatDateTime('ap', time()) + #$A#$D +
FormatDateTime('e', date()) + #$A#$D +
FormatDateTime('ee', date()) + #$A#$D +
FormatDateTime('g', date()) + #$A#$D +
FormatDateTime('gg', date()) + #$A#$D +
FormatDateTime('yyy', date()) + #$A#$D + FormatDateTime('yy', date()) + #$A#$D +
FormatDateTime('mm', date()) + #$A#$D +
FormatDateTime('dd', date()) + #$A#$D +
FormatDateTime('mmm', date()) + #$A#$D +
FormatDateTime('ddd', date()) + #$A#$D +
FormatDateTime('mmmm', date()) + #$A#$D +
FormatDateTime('dddd', date()) + #$A#$D +
FormatDateTime('h', time()) + #$A#$D +
FormatDateTime('hh', time()) + #$A#$D +
FormatDateTime('n', time()) + #$A#$D +
FormatDateTime('nn', time()) + #$A#$D +
FormatDateTime('s', time()) + #$A#$D +
FormatDateTime('ss', time()) + #$A#$D +
FormatDateTime('z', time()) + #$A#$D +
FormatDateTime('zzz', time()) + #$A#$D +
FormatDateTime('m', date()) + #$A#$D )
;
end;
procedure TMainFrm.tx12Click(Sender: TObject);
begin
ShellExecute(Handle, nil, 'http://www.krinkels.ru/', nil, nil, Sw_ShowNormal);
end;
procedure TMainFrm.FormDestroy(Sender: TObject);
begin
Timer.Free;
end;
end.
المشاركات : 61
المواضيع 22
:
: 19
الإنتساب : Dec 2009
شكرا اخي الكريم على الصبر معي المشكلة في البرنامج ان الوقت محدد برمجيا في TDateTime كما وضعته انت 05:09:00 الى غاية 09:00:00 بالعكس **** انا من يتحكم في الوقت مثل التاريخ لانه هذا هو غرضي من اجل اعطائي الفرق بين التاريخين و الوقتيين الذان حدتهما انا و**** الرد عليا بواسطة البرنامج الذي وصعته انا في الموضوع وشكرا اخي الكريم
المشاركات : 61
المواضيع 22
:
: 19
الإنتساب : Dec 2009
المشاركات : 418
المواضيع 50
:
: 0
الإنتساب : Sep 2009
سمعا وطاعة
ولكن لا تغيب علينا لاننا كل يوم في وادي
المشاركات : 61
المواضيع 22
:
: 19
الإنتساب : Dec 2009
شكرا اخي الكريم على هذا الاهتمام منك ولله طبيعة عمل تفرض عليا الغيا ولكن سوف احاول ان اكون على علم بكل المجريات وراجو قف الاجابة على سؤالي باقصى سرعة ونعمى الصديق اخي الكريم
المشاركات : 418
المواضيع 50
:
: 0
الإنتساب : Sep 2009
الملفات المرفقة
time deferences.7z (الحجم : 295.86 ك ب / التحميلات : 31)
المشاركات : 418
المواضيع 50
:
: 0
الإنتساب : Sep 2009
هذا 49
اعتقد انه صحيح كلامك واليك الحل
الملفات المرفقة
time deferences Final.7z (الحجم : 301.22 ك ب / التحميلات : 53)
المشاركات : 61
المواضيع 22
:
: 19
الإنتساب : Dec 2009
ممكن تنزع pakage منه وتعيد ارساله بدون pakage لانه اثر على برنامج ابعثه لي كما اعطيته لك وشكرا