03-08-2011, 05:24 PM
03-08-2011, 05:38 PM
عندك الحق خاصة اليومين الاخريين
المهم انتظر منك البرنامج اليوم ولله مستعجل اخي الكريم
المهم انتظر منك البرنامج اليوم ولله مستعجل اخي الكريم
03-08-2011, 10:13 PM
للفائدة فقظ مثال رائع
كود :
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.06-08-2011, 09:28 AM
شكرا اخي الكريم على الصبر معي المشكلة في البرنامج ان الوقت محدد برمجيا في TDateTime كما وضعته انت 05:09:00 الى غاية 09:00:00 بالعكس **** انا من يتحكم في الوقت مثل التاريخ لانه هذا هو غرضي من اجل اعطائي الفرق بين التاريخين و الوقتيين الذان حدتهما انا و**** الرد عليا بواسطة البرنامج الذي وصعته انا في الموضوع وشكرا اخي الكريم
06-08-2011, 09:33 AM
و هذة هي الصورة مرفقة
06-08-2011, 04:54 PM
سمعا وطاعة
ولكن لا تغيب علينا لاننا كل يوم في وادي
ولكن لا تغيب علينا لاننا كل يوم في وادي
06-08-2011, 05:05 PM
شكرا اخي الكريم على هذا الاهتمام منك ولله طبيعة عمل تفرض عليا الغيا ولكن سوف احاول ان اكون على علم بكل المجريات وراجو قف الاجابة على سؤالي باقصى سرعة ونعمى الصديق اخي الكريم
06-08-2011, 05:36 PM
![[صورة: picture0001g.png]](http://img508.imageshack.us/img508/6856/picture0001g.png)
11-08-2011, 06:09 PM
هذا 49
![[صورة: picture0001k.png]](http://img804.imageshack.us/img804/3781/picture0001k.png)
اعتقد انه صحيح كلامك واليك الحل
![[صورة: picture0002p.png]](http://img402.imageshack.us/img402/7378/picture0002p.png)
![[صورة: picture0001k.png]](http://img804.imageshack.us/img804/3781/picture0001k.png)
اعتقد انه صحيح كلامك واليك الحل
![[صورة: picture0002p.png]](http://img402.imageshack.us/img402/7378/picture0002p.png)
11-08-2011, 09:28 PM
ممكن تنزع pakage منه وتعيد ارساله بدون pakage لانه اثر على برنامج ابعثه لي كما اعطيته لك وشكرا
![[صورة: picture0001s.png]](http://img143.imageshack.us/img143/8213/picture0001s.png)