Scalabium Software

SMExport/SMImport suites
Knowledge for your independence'.
Home Delphi and C++Builder tips


#7: How can I detect a current version of MS Windows?

var
  OSVersionInfo : TOSVersionInfo;
begin
  OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo);
  if GetVersionEx(OSVersionInfo) then
    with OSVersionInfo do
    begin
      WinVerLabel.Caption := Format('%s%s%s%s%s%s%s%s',
                        ['Windows: ', IntToStr(dwMajorVersion), '.',
                         IntToStr(dwMinorVersion), ' (Build ',
                         IntToStr(dwBuildNumber), szCSDVersion, ')']);
      case dwPlatformId of
        0: WinPlatformLabel.Caption := 'Platform: Win32s on Windows 3.1';
        1: WinPlatformLabel.Caption := 'Platform: Win32 on Windows 95';
        2: WinPlatformLabel.Caption := 'Platform: Windows NT';
      end;
    end;
end;


Published: August 5, 1999

See also
 
SMExport suite
Metafile Convert
Paradox Viewer
SMReport
Viewer for TNEF-files (winmail.dat)
Paradox ActiveX
Clarion Viewer
ExcelFile Viewer
Excel Reader (dll)
DBISAM Password Recovery
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2024, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport/SMImport suites