masukan komponen berikut :
Tmemo
2 buah Tbutton
Ubah caption Tbutton pertama dengan "lihat" yang kedua menjadi "clear".
klik dua kali button pertama dan masukan kode berikut:
procedure TForm1.Button1Click(Sender: TObject);
const
Processor_Architecture_INTEL=0;
Processor_Architecture_MIPS=1;
Processor_Architecture_ALPHA=2;
Processor_Architecture_PPC=3;
Processor_Architecture_UNKNOWN=$FFFF;
Processor_INTEL_386=386;
Processor_INTEL_486=486;
processor_INTEL_Pentium=586;
Processor_MIPS_R4000=4000;
Processor_ALPHA_21064=21064;
var
SystemInfo:TSystemInfo;
begin
GetSystemInfo(SystemInfo);
With SystemInfo do
begin
case wProcessorArchitecture of
Processor_Architecture_INTEL:memo1.Lines.add('Processor: INTEL');
Processor_Architecture_MIPS:memo1.Lines.add('Processor: MIPS');
Processor_Architecture_ALPHA:memo1.Lines.add('Processor: ALPHA');
Processor_Architecture_PPC:memo1.Lines.add('Processor: Power PC');
end;
memo1.Lines.Add('Nomor Processor :'+inttostr(dwNumberofprocessors));
case dwprocessortype of
Processor_INTEL_386:memo1.Lines.add('Type Processor : 80386 ');
Processor_INTEL_486:memo1.Lines.add('Type Processor : 80486 ');
Processor_INTEL_Pentium:memo1.Lines.add('Type Processor : Pentium ');
Processor_MIPS_R4000:memo1.Lines.add('Type Processor : R4000 ');
Processor_ALPHA_21064:memo1.Lines.add('Type Processor : 21064');
end;
memo1.Lines.add('');
memo1.Lines.add('Status memori');
memo1.Lines.add('Ukuran Page Aktif :'+inttostr(dwpagesize));
memo1.Lines.add('Alokasi Granularity :'+inttostr(dwallocationgranularity));
end;
end;
Tmemo
2 buah Tbutton
Ubah caption Tbutton pertama dengan "lihat" yang kedua menjadi "clear".
klik dua kali button pertama dan masukan kode berikut:
procedure TForm1.Button1Click(Sender: TObject);
const
Processor_Architecture_INTEL=0;
Processor_Architecture_MIPS=1;
Processor_Architecture_ALPHA=2;
Processor_Architecture_PPC=3;
Processor_Architecture_UNKNOWN=$FFFF;
Processor_INTEL_386=386;
Processor_INTEL_486=486;
processor_INTEL_Pentium=586;
Processor_MIPS_R4000=4000;
Processor_ALPHA_21064=21064;
var
SystemInfo:TSystemInfo;
begin
GetSystemInfo(SystemInfo);
With SystemInfo do
begin
case wProcessorArchitecture of
Processor_Architecture_INTEL:memo1.Lines.add('Processor: INTEL');
Processor_Architecture_MIPS:memo1.Lines.add('Processor: MIPS');
Processor_Architecture_ALPHA:memo1.Lines.add('Processor: ALPHA');
Processor_Architecture_PPC:memo1.Lines.add('Processor: Power PC');
end;
memo1.Lines.Add('Nomor Processor :'+inttostr(dwNumberofprocessors));
case dwprocessortype of
Processor_INTEL_386:memo1.Lines.add('Type Processor : 80386 ');
Processor_INTEL_486:memo1.Lines.add('Type Processor : 80486 ');
Processor_INTEL_Pentium:memo1.Lines.add('Type Processor : Pentium ');
Processor_MIPS_R4000:memo1.Lines.add('Type Processor : R4000 ');
Processor_ALPHA_21064:memo1.Lines.add('Type Processor : 21064');
end;
memo1.Lines.add('');
memo1.Lines.add('Status memori');
memo1.Lines.add('Ukuran Page Aktif :'+inttostr(dwpagesize));
memo1.Lines.add('Alokasi Granularity :'+inttostr(dwallocationgranularity));
end;
end;
kemudian klik dua kali button kedua dan masukan perintah:
procedure TForm1.Button2Click(Sender: TObject);
begin
memo1.Clear;
end;
begin
memo1.Clear;
end;
No comments:
Post a Comment