السلام عليكم
انا عضو جديد يسعدني الانضمام الى هذا المنتدى خاصه منتدى الديلفي
وسوف اقوم بطرح اول سؤال ليه وان شاء الله ما اكون ازعجتكم
اذا انا حصلت على هذا الكود فا كيف يمكني برمجته بلغه الديلفي يعني صنعه برنامج
وهذا الكود يعمل على تغيير وقت نضام الوندوز
function SetPCSystemTime(tDati: TDateTime): Boolean;
var
tSetDati: TDateTime;
vDatiBias: Variant;
tTZI: TTimeZoneInformation;
tST: TSystemTime;begin
GetTimeZoneInformation(tTZI);
vDatiBias := tTZI.Bias / 1440;
tSetDati := tDati + vDatiBias;
with tST do
begin
wYear := StrToInt(FormatDateTime('yyyy', tSetDati));
wMonth := StrToInt(FormatDateTime('mm', tSetDati));
wDay := StrToInt(FormatDateTime('dd', tSetDati));
wHour := StrToInt(FormatDateTime('hh', tSetDati));
wMinute := StrToInt(FormatDateTime('nn', tSetDati));
wSecond := StrToInt(FormatDateTime('ss', tSetDati));
wMilliseconds := 0;
end;
SetPCSystemTime := SetSystemTime(tST);
end;ولل علم اذا اعطيت هاذا الكود يمكنني ان اعمله برنامج واستطيع التغيير عليه
procedure TmainForm.RestartWindowsBtnClick(Sender: TObject);
begin
if not ExitWindows(EW_RestartWindows, 0) then ShowMessage('لا استطيع '); end;واخيرا المطلوب كيف استطيع كيف استعمل الكود الاول في صنع برنامج
وشكرا لكم جزيلا
:D