procedure TForm1.Button1Click(Sender: TObject);
function WichOsVersion: String;
begin
If (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion > 5) then
begin
If (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MinorVersion < 1) then
result := 'Windows Vista'
else
result := 'Windows 7 or higher';
end
else
begin
result := 'Lower than Windows Vista';
end;
end;
begin
ShowMessage(WichOsVersion);
end;
|