Version af windows:
procedure TForm1.Button2Click(Sender: TObject);
var
Info: TOSVersionInfoA;
begin
Info.dwOSVersionInfoSize:=sizeof(Info);
GetVersionEx(Info);
Label1.Caption:='MajorVersion - '+IntToStr(Info.dwMajorVersion);
Label2.Caption:='MinorVersion - '+IntToStr(Info.dwMinorVersion);
Label3.Caption:='BuildNumber - '+IntToStr(Info.dwBuildNumber);
case Info.dwPlatformID of
VER_PLATFORM_WIN32s: Label4.Caption:='Win32 on Windows 3.1';
VER_PLATFORM_WIN32_WINDOWS: Label4.Caption:='Win32 on Windows 95/98';
VER_PLATFORM_WIN32_NT: Label4.Caption:='Win32 on Windows NT';
end;
end;
Comuternavn:
procedure TForm1.Button1Click(Sender: TObject);
var
CompName: array[0..256] of Char;
i: DWord;
begin
i:=256;
GetComputerName(CompName, i);
Label1.Caption:=StrPas(CompName);
end;
Disk plads:
var
Disk: Integer;
...
procedure TForm1.Button1Click(Sender: TObject);
var
Total, Free: LongInt;
begin
Total:=DiskSize(Disk) div 1024;
Free:=DiskFree(Disk) div 1024;
Gauge1.MaxValue:=Total;
Gauge1.Progress:=Free;
Label1.Caption:='Total size - '+IntToStr(Total);
Label2.Caption:='Free - '+IntToStr(Free);
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Disk:=ComboBox1.ItemIndex+1;
end;
Prossesor type:
procedure TForm1.Button1Click(Sender: TObject);
var
MySystem: TSystemInfo;
begin
GetSystemInfo(MySystem);
with Memo1.Lines do
begin
if (MySystem.wProcessorArchitecture=0) then
Add('Intel architecture');
Add(FloatToStr(MySystem.dwPageSize)+' Kb page size');
Add(Format(
'Lowest memory address accessible to applications and DLL - %p',
[MySystem.lpMinimumApplicationAddress]));
Add(Format(
'Highest memory address accessible to applications and DLL - %p',
[MySystem.lpMaximumApplicationAddress]));
Add(IntToStr(
MySystem.dwNumberOfProcessors)+' - number of processors');
Add(FloatToStr(
MySystem.dwAllocationGranularity/1024)+
' Kb - granularity with which virtual memory is allocated');
case MySystem.wProcessorLevel of
3: Add('Intel 80386 processor level');
4: Add('Intel 80486 processor level');
5: Add('Intel Pentium processor level');
end;
end;
end;
Nu får du ikke mere.... Ihvertfald ikke får 10 up
Med venlig hilsen
Frede_Manden