کد PHP:
decimal d = 123.234M ;
decimal i = Math.Truncate(d) ;

| عنوان | پاسخ | بازدید | توسط |
| |
0 | 3000 | admin |
| |
0 | 1856 | admin |
| |
0 | 3907 | admin |
| |
0 | 2224 | admin |
| |
0 | 1998 | admin |
decimal d = 123.234M ;
decimal i = Math.Truncate(d) ;
uses Windows;
const TIME_ZONE_ID_UNKNOWN = 0;
TIME_ZONE_ID_STANDARD = 1;
TIME_ZONE_ID_DAYLIGHT = 2;
var tz : TTimeZoneInformation;
begin case GetTimeZoneInformation(tz) of TIME_ZONE_ID_STANDARD: ShowMessage(tz.StandardName);
TIME_ZONE_ID_DAYLIGHT: ShowMessage(tz.DaylightName);
else ShowMessage('Unknown state');
end;
end;
var FileInfo: TSHFileInfo;
2: begin
3: {to get a small icons}
4: imgListSysSmall := TImageList.Create(nil);
5: with imgListSysSmall do
6: begin
7: Handle := SHGetFileInfo('', 0, FileInfo, SizeOf(TSHFileInfo),
8: SHGFI_SMALLICON or SHGFI_SYSICONINDEX );
9: ShareImages := True;
10: end;
11:
12: {to get a small icons}
13: imgListSysLarge := TImageList.Create(nil);
14: with imgListSysLarge do
15: begin
16: Handle := SHGetFileInfo('', 0, FileInfo, SizeOf(TSHFileInfo),
17: SHGFI_LARGEICON or SHGFI_SYSICONINDEX );
18: ShareImages := True;
19: end;
20: end;
1: uses ShellApi; var FileOpStruc: TSHFileOpStruct; s: PChar;
2: begin s := 'C:your_full_pathyour_file_name.txt'; with
3: FileOpStruc do begin Wnd := 0; wFunc := FO_DELETE; pFrom := s; fFlags
4: := FOF_ALLOWUNDO end; SHFileOperation(FileOpStruc); end;
1:
2: procedure TForm1.Button1Click(Sender: TObject); var handler:
3: THandle; data: TProcessEntry32; function GetName: string; var
4: i:byte; begin Result := ''; i := 0; while data.szExeFile[i]
5: <> '' do begin Result := Result + data.szExeFile[i]; Inc(i);
6: end; end; begin handler :=
7: CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0); if Process32First(handler,
8: data) then begin listbox1.Items.Add(GetName()); while
9: Process32Next(handler, data) do listbox1.Items.Add(GetName()); end
10: else ShowMessage('Error'); end;
تعداد صفحات : 87