home   |   -   |   A-Z   |  


System Info About Box . ( Delphi COA):

Procedure GetInfo;

Var

WinVer, WinFlags : LongInt; { Windows }

hInstUser, Fmt : Word; { }

Buffer : ARRAY[0..30] OF Char; { ASCIIZ }

begin

hInstUser := LoadLibrary('USER'); { User }

LoadString(hInstUser, 514, Buffer, 30);

LabelUserName.Caption := StrPas(Buffer); { }

LoadString(hInstUser, 515, Buffer, 30);

FreeLibrary(hInstUser);

LabelCompName.Caption := StrPas(Buffer); { }

WinVer := GetVersion;

LabelWinVer.Caption := Format('Windows %u.%.2u', { Windows }

[LoByte(LoWord(WinVer)), HiByte(LoWord(WinVer))]);

LabelDosVer.Caption := Format('DOS %u.%.2u', { DOS }

[HiByte(HiWord(WinVer)), LoByte(HiWord(WinVer))]);

WinFlags := GetWinFlags;

IF WinFlags AND WF_ENHANCED > 0 THEN LabelWinMode.Caption := '386 Enhanced Mode' { }

ELSE IF WinFlags AND WF_PMODE > 0 THEN LabelWinMode.Caption := 'Standard Mode'

ELSE LabelWinMode.Caption := 'Real Mode';

IF WinFlags AND WF_80x87 > 0 THEN { }

ValueMathCo.Caption := 'Present'

ELSE ValueMathCo.Caption := 'Absent';

Fmt := GetFreeSystemResources(GFSR_SYSTEMRESOURCES);

ValueFSRs.Caption := Format('%d%% Free', [Fmt1]); { }

{ }

ValueMemory.Caption := FormatFloat(',#######', MemAvail DIV 1024) + ' KB Free';

end;


| Delphi | ?