home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / delphi / kompon / d56 / MSYSINFO.ZIP / D5 / MSI_Overview.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2002-04-05  |  49.6 KB  |  1,792 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {         MiTeC System Information Component            }
  5. {                System Overview                        }
  6. {           version 7.4 for Delphi 5,6                  }
  7. {                                                       }
  8. {       Copyright ⌐ 1997,2002 Michal Mutl               }
  9. {                                                       }
  10. {*******************************************************}
  11.  
  12.  
  13. {$INCLUDE MITEC_DEF.INC}
  14.  
  15. unit MSI_Overview;
  16.  
  17. interface
  18.  
  19. uses
  20.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  21.   MSI_GUI, ComCtrls, StdCtrls, ExtCtrls, CheckLst,
  22.   ImgList, Mask, Menus, Gauges, Buttons, MSI_CPUUsage;
  23.  
  24. type
  25.   TPage = (pgWksta, pgOS, pgCPU, pgMem, pgDisplay, pgAPM, pgMedia, pgNet, pgDev,
  26.            pgPrn, pgEng, pgDisk, pgTZ, pgStartup, pgSoftware, pgAbout);
  27.  
  28.   TPages = set of TPage;
  29.  
  30. const
  31.   iiComputer      = 0;
  32.   iiSystem        = 1;
  33.   iiDisplay       = 2;
  34.   iiMonitor       = 3;
  35.   iiVolumes       = 4;
  36.   iiFDD           = 5;
  37.   iiHDD           = 6;
  38.   iiCDROM         = 7;
  39.   iiTape          = 8;
  40.   iiAPM           = 9;
  41.   iiImaging       = 10;
  42.   iiKeyboard      = 11;
  43.   iiMouse         = 12;
  44.   iiModem         = 13;
  45.   iiPort          = 14;
  46.   iiAdapter       = 15;
  47.   iiPackage       = 16;
  48.   iiSCSI          = 17;
  49.   iiDriver        = 18;
  50.   iiSound         = 19;
  51.   iiUSB           = 20;
  52.   iiGame          = 21;
  53.   iiNet           = 22;
  54.   iiProcess       = 23;
  55.   iiPCMCIA        = 24;
  56.   iiChanger       = 25;
  57.   iiHID           = 26;
  58.   iiGPS           = 27;
  59.   iiReader        = 28;
  60.   iiInfrared      = 29;
  61.   iiMIDI          = 30;
  62.   iiWave          = 31;
  63.   iiMixer         = 32;
  64.   iiAUX           = 33;
  65.   iiDirectX       = 34;
  66.   iiPrinter       = 35;
  67.   iiPrinterDef    = 36;
  68.   iiNetPrinter    = 37;
  69.   iiNetPrinterDef = 38;
  70.   iiController    = 39;
  71.   iiMemory        = 40;
  72.   
  73.  
  74.  
  75.   pgAll = [pgWksta, pgOS, pgCPU, pgMem, pgDisplay, pgAPM, pgMedia, pgNet, pgDev,
  76.            pgPrn, pgEng, pgDisk, pgTZ, pgStartup, pgSoftware];
  77.  
  78.  
  79. type
  80.   TfrmMSI_Overview = class(TForm)
  81.     Panel1: TPanel;
  82.     Panel2: TPanel;
  83.     bRefresh: TButton;
  84.     Panel3: TPanel;
  85.     pc: TPageControl;
  86.     tsWksta: TTabSheet;
  87.     tsOS: TTabSheet;
  88.     tsCPU: TTabSheet;
  89.     pNumLock: TPanel;
  90.     pCapsLock: TPanel;
  91.     pScrollLock: TPanel;
  92.     bOK: TButton;
  93.     Image2: TImage;
  94.     lVersion: TLabel;
  95.     lVerNo: TLabel;
  96.     Bevel1: TBevel;
  97.     bEnvironment: TButton;
  98.     Image3: TImage;
  99.     lCPU: TLabel;
  100.     tsMemory: TTabSheet;
  101.     tsDisplay: TTabSheet;
  102.     Image5: TImage;
  103.     cbDisplay: TEdit;
  104.     Label33: TLabel;
  105.     GroupBox10: TGroupBox;
  106.     Label34: TLabel;
  107.     Label35: TLabel;
  108.     Label36: TLabel;
  109.     eChip: TEdit;
  110.     eDAC: TEdit;
  111.     eMem: TEdit;
  112.     GroupBox11: TGroupBox;
  113.     GroupBox12: TGroupBox;
  114.     eBIOS: TEdit;
  115.     lTechnology: TLabel;
  116.     lMetrics: TLabel;
  117.     lPixWidth: TLabel;
  118.     lPixHeight: TLabel;
  119.     lPixDiag: TLabel;
  120.     bCurve: TButton;
  121.     bLine: TButton;
  122.     bPoly: TButton;
  123.     bRaster: TButton;
  124.     bText: TButton;
  125.     Label37: TLabel;
  126.     tsAPM: TTabSheet;
  127.     GroupBox13: TGroupBox;
  128.     Label38: TLabel;
  129.     Label39: TLabel;
  130.     eAC: TEdit;
  131.     eBat: TEdit;
  132.     Image6: TImage;
  133.     GroupBox14: TGroupBox;
  134.     Label40: TLabel;
  135.     Label41: TLabel;
  136.     eBatFull: TEdit;
  137.     eBatLife: TEdit;
  138.     tsMedia: TTabSheet;
  139.     Label42: TLabel;
  140.     Panel5: TPanel;
  141.     img: TImageList;
  142.     tsNetwork: TTabSheet;
  143.     tsDevices: TTabSheet;
  144.     psd: TPrinterSetupDialog;
  145.     tsPrinters: TTabSheet;
  146.     Label48: TLabel;
  147.     Panel7: TPanel;
  148.     lvPrinter: TListView;
  149.     bPrint: TButton;
  150.     tsEngines: TTabSheet;
  151.     GroupBox17: TGroupBox;
  152.     Image7: TImage;
  153.     lODBC: TLabel;
  154.     lBDE: TLabel;
  155.     tsDrives: TTabSheet;
  156.     Label54: TLabel;
  157.     cbDrive: TComboBox;
  158.     GroupBox19: TGroupBox;
  159.     imgDrive: TImage;
  160.     lDriveType: TLabel;
  161.     clbFlags: TCheckListBox;
  162.     Label55: TLabel;
  163.     Label56: TLabel;
  164.     eUNC: TEdit;
  165.     eDSN: TEdit;
  166.     Bevel3: TBevel;
  167.     lCapacity: TLabel;
  168.     lFree: TLabel;
  169.     lBPS: TLabel;
  170.     lSPC: TLabel;
  171.     lTC: TLabel;
  172.     lFC: TLabel;
  173.     Bevel4: TBevel;
  174.     bReport: TButton;
  175.     ReportMenu: TPopupMenu;
  176.     pmAll: TMenuItem;
  177.     pmSelected: TMenuItem;
  178.     Panel10: TPanel;
  179.     gDisk: TGauge;
  180.     Panel11: TPanel;
  181.     gAPM: TGauge;
  182.     bModes: TButton;
  183.     tsTZ: TTabSheet;
  184.     Panel12: TPanel;
  185.     Image10: TImage;
  186.     gbStd: TGroupBox;
  187.     Label12: TLabel;
  188.     Label73: TLabel;
  189.     eStdStart: TEdit;
  190.     eStdBias: TEdit;
  191.     eTZ: TEdit;
  192.     Label74: TLabel;
  193.     gbDay: TGroupBox;
  194.     Label75: TLabel;
  195.     Label76: TLabel;
  196.     Label77: TLabel;
  197.     edayStart: TEdit;
  198.     eDayBias: TEdit;
  199.     lFontRes: TLabel;
  200.     Panel8: TPanel;
  201.     Tree: TTreeView;
  202.     Panel9: TPanel;
  203.     bProps: TButton;
  204.     pcCPU: TPageControl;
  205.     tsID: TTabSheet;
  206.     tsFeatures: TTabSheet;
  207.     GroupBox5: TGroupBox;
  208.     lModel: TLabel;
  209.     lSerial: TLabel;
  210.     lVendor: TLabel;
  211.     GroupBox21: TGroupBox;
  212.     lL1Data: TLabel;
  213.     lL1Code: TLabel;
  214.     lLevel1: TLabel;
  215.     lLevel2: TLabel;
  216.     GroupBox6: TGroupBox;
  217.     Panel4: TPanel;
  218.     clbCPU: TCheckListBox;
  219.     lCodename: TLabel;
  220.     lDAO: TLabel;
  221.     tsAbout: TTabSheet;
  222.     FooterPanel: TPanel;
  223.     sbMail: TSpeedButton;
  224.     TitlePanel: TPanel;
  225.     imgIcon: TImage;
  226.     Panel16: TPanel;
  227.     Memo: TMemo;
  228.     tsStartup: TTabSheet;
  229.     tsSoftware: TTabSheet;
  230.     tcStartup: TTabControl;
  231.     bNTSpec: TButton;
  232.     lvMedia: TListView;
  233.     Panel18: TPanel;
  234.     lvSound: TListView;
  235.     Label14: TLabel;
  236.     Panel20: TPanel;
  237.     lvSW: TListView;
  238.     Panel21: TPanel;
  239.     lvStartup: TListView;
  240.     lTitle: TLabel;
  241.     lVer: TLabel;
  242.     lADO: TLabel;
  243.     lCSD: TLabel;
  244.     lDVD: TLabel;
  245.     pcOS: TPageControl;
  246.     tsGeneral: TTabSheet;
  247.     tsFolders: TTabSheet;
  248.     tsInternet: TTabSheet;
  249.     Label9: TLabel;
  250.     Label10: TLabel;
  251.     Label11: TLabel;
  252.     Label15: TLabel;
  253.     ePID: TEdit;
  254.     eRegUser: TEdit;
  255.     eRegOrg: TEdit;
  256.     ePKey: TEdit;
  257.     Panel15: TPanel;
  258.     FolderList: TListView;
  259.     Label43: TLabel;
  260.     Label44: TLabel;
  261.     Label45: TLabel;
  262.     Label46: TLabel;
  263.     eBrowser: TEdit;
  264.     eProxy: TEdit;
  265.     email: TEdit;
  266.     lCT: TLabel;
  267.     Bevel2: TBevel;
  268.     lCacheDesc: TLabel;
  269.     eMachine: TEdit;
  270.     pcEng: TPageControl;
  271.     tsDirectX: TTabSheet;
  272.     tsASPI: TTabSheet;
  273.     Panel19: TPanel;
  274.     lvDirectX: TListView;
  275.     ilEng: TImageList;
  276.     Panel22: TPanel;
  277.     lvASPI: TListView;
  278.     lASPI: TLabel;
  279.     Bevel5: TBevel;
  280.     lDirectX: TLabel;
  281.     Bevel6: TBevel;
  282.     tsLocale: TTabSheet;
  283.     Panel17: TPanel;
  284.     LocaleList: TListView;
  285.     Panel23: TPanel;
  286.     pcMem: TPageControl;
  287.     tsmemGen: TTabSheet;
  288.     GroupBox7: TGroupBox;
  289.     Image4: TImage;
  290.     Label16: TLabel;
  291.     Label17: TLabel;
  292.     Label18: TLabel;
  293.     Label19: TLabel;
  294.     Label20: TLabel;
  295.     Label21: TLabel;
  296.     Label22: TLabel;
  297.     Label23: TLabel;
  298.     Label24: TLabel;
  299.     Label25: TLabel;
  300.     Label26: TLabel;
  301.     Label27: TLabel;
  302.     ePT: TEdit;
  303.     ePF: TEdit;
  304.     eFT: TEdit;
  305.     eFF: TEdit;
  306.     eVT: TEdit;
  307.     eVF: TEdit;
  308.     GroupBox9: TGroupBox;
  309.     Label28: TLabel;
  310.     Label29: TLabel;
  311.     Label30: TLabel;
  312.     Label31: TLabel;
  313.     Label32: TLabel;
  314.     eAG: TEdit;
  315.     eAppAddr: TEdit;
  316.     ePS: TEdit;
  317.     tsmemMeas: TTabSheet;
  318.     GroupBox8: TGroupBox;
  319.     gMemory: TGauge;
  320.     GroupBox1: TGroupBox;
  321.     lGDI: TLabel;
  322.     lSystem: TLabel;
  323.     lUser: TLabel;
  324.     pbGDI: TProgressBar;
  325.     pbSystem: TProgressBar;
  326.     pbUser: TProgressBar;
  327.     CPUUsage: TMCPUUsage;
  328.     Label13: TLabel;
  329.     Label50: TLabel;
  330.     gPhys: TGauge;
  331.     Label49: TLabel;
  332.     gPage: TGauge;
  333.     Label51: TLabel;
  334.     gVirt: TGauge;
  335.     Panel24: TPanel;
  336.     CPUGauge: TGauge;
  337.     Label52: TLabel;
  338.     pcMachine: TPageControl;
  339.     tsMachineGeneral: TTabSheet;
  340.     tsMachineSMBIOS: TTabSheet;
  341.     gbMID: TGroupBox;
  342.     Label1: TLabel;
  343.     Label2: TLabel;
  344.     Image1: TImage;
  345.     eWksta: TEdit;
  346.     eUser: TEdit;
  347.     GroupBox2: TGroupBox;
  348.     Label3: TLabel;
  349.     Label4: TLabel;
  350.     Label5: TLabel;
  351.     Label6: TLabel;
  352.     Label53: TLabel;
  353.     eBIOSVendor: TEdit;
  354.     eBIOSVer: TEdit;
  355.     eBIOSDate: TEdit;
  356.     eBIOSSize: TEdit;
  357.     GroupBox3: TGroupBox;
  358.     Label7: TLabel;
  359.     Label8: TLabel;
  360.     eLastBoot: TEdit;
  361.     eSysTime: TEdit;
  362.     Panel25: TPanel;
  363.     Label60: TLabel;
  364.     eSMVer: TEdit;
  365.     Bevel7: TBevel;
  366.     pcSM: TPageControl;
  367.     tsSMSystem: TTabSheet;
  368.     GroupBox4: TGroupBox;
  369.     Label61: TLabel;
  370.     Label62: TLabel;
  371.     lSysVer: TLabel;
  372.     lSysSer: TLabel;
  373.     lSysID: TLabel;
  374.     eSysMod: TEdit;
  375.     eSysMan: TEdit;
  376.     eSysVer: TEdit;
  377.     eSysSer: TEdit;
  378.     eSysID: TEdit;
  379.     tsSMMB: TTabSheet;
  380.     GroupBox15: TGroupBox;
  381.     Label67: TLabel;
  382.     Label68: TLabel;
  383.     Label70: TLabel;
  384.     Label71: TLabel;
  385.     eMBMod: TEdit;
  386.     eMBMan: TEdit;
  387.     eMBVer: TEdit;
  388.     eMBSer: TEdit;
  389.     tsSMCH: TTabSheet;
  390.     GroupBox18: TGroupBox;
  391.     Label78: TLabel;
  392.     Label79: TLabel;
  393.     Label80: TLabel;
  394.     Label81: TLabel;
  395.     eCHMod: TEdit;
  396.     eCHMan: TEdit;
  397.     eCHVer: TEdit;
  398.     eCHSer: TEdit;
  399.     tsSMCPU: TTabSheet;
  400.     GroupBox22: TGroupBox;
  401.     Label83: TLabel;
  402.     Label84: TLabel;
  403.     Label85: TLabel;
  404.     Label86: TLabel;
  405.     Label63: TLabel;
  406.     Label65: TLabel;
  407.     eSocket: TEdit;
  408.     eUpgIntf: TEdit;
  409.     eVolt: TEdit;
  410.     eExtClk: TEdit;
  411.     tsSMMem: TTabSheet;
  412.     Panel26: TPanel;
  413.     lvMem: TListView;
  414.     tsSMPort: TTabSheet;
  415.     Panel27: TPanel;
  416.     lvPort: TListView;
  417.     tsSMSlot: TTabSheet;
  418.     Panel28: TPanel;
  419.     lvSlot: TListView;
  420.     tsSMTables: TTabSheet;
  421.     Panel29: TPanel;
  422.     lvTables: TListView;
  423.     Label66: TLabel;
  424.     eSMTables: TEdit;
  425.     SpeedButton1: TSpeedButton;
  426.     Panel6: TPanel;
  427.     pcNet: TPageControl;
  428.     tsNetGeneral: TTabSheet;
  429.     Label47: TLabel;
  430.     Panel13: TPanel;
  431.     lvNetwork: TListView;
  432.     GroupBox16: TGroupBox;
  433.     Panel14: TPanel;
  434.     Label69: TLabel;
  435.     lbMAC: TListBox;
  436.     Panel30: TPanel;
  437.     Label64: TLabel;
  438.     lbIP: TListBox;
  439.     bProto: TButton;
  440.     bServ: TButton;
  441.     bCli: TButton;
  442.     tsNetWinsock: TTabSheet;
  443.     Label57: TLabel;
  444.     Label58: TLabel;
  445.     Label59: TLabel;
  446.     Image9: TImage;
  447.     eWSDesc: TEdit;
  448.     eWSVer: TEdit;
  449.     eWSStat: TEdit;
  450.     tsNetTCPIP: TTabSheet;
  451.     Label72: TLabel;
  452.     Label82: TLabel;
  453.     eHost: TEdit;
  454.     eDomain: TEdit;
  455.     Image8: TImage;
  456.     Panel31: TPanel;
  457.     AdapterList: TListView;
  458.     Bevel8: TBevel;
  459.     cbxProxy: TCheckBox;
  460.     cbxRouting: TCheckBox;
  461.     cbxDNS: TCheckBox;
  462.     cbAdapters: TComboBox;
  463.     Label87: TLabel;
  464.     Label88: TLabel;
  465.     eCPU: TEdit;
  466.     Label89: TLabel;
  467.     Label90: TLabel;
  468.     eClock: TEdit;
  469.     l: TLabel;
  470.     eCPUMan: TEdit;
  471.     tsSMCaches: TTabSheet;
  472.     Panel32: TPanel;
  473.     lvCache: TListView;
  474.     procedure FormCreate(Sender: TObject);
  475.     procedure cmRefresh(Sender: TObject);
  476.     procedure cmClose(Sender: TObject);
  477.     procedure cmEnvironment(Sender: TObject);
  478.     procedure cmCaps(Sender: TObject);
  479.     procedure cmPrintSetup(Sender: TObject);
  480.     procedure cbDriveChange(Sender: TObject);
  481.     procedure cmReportClick(Sender: TObject);
  482.     procedure cmReportAll(Sender: TObject);
  483.     procedure cmReportCurrent(Sender: TObject);
  484.     procedure clbClickCheck(Sender: TObject);
  485.     procedure cmModes(Sender: TObject);
  486.     procedure cmProto(Sender: TObject);
  487.     procedure cmServ(Sender: TObject);
  488.     procedure cmCli(Sender: TObject);
  489.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  490.     procedure TreeChange(Sender: TObject; Node: TTreeNode);
  491.     procedure cmProps(Sender: TObject);
  492.     procedure cmMail(Sender: TObject);
  493.     procedure tcStartupChange(Sender: TObject);
  494.     procedure cmNTSpec(Sender: TObject);
  495.     procedure CPUUsageInterval(Sender: TObject; Value: Cardinal);
  496.     procedure cmWeb(Sender: TObject);
  497.     procedure cbAdaptersChange(Sender: TObject);
  498.   private
  499.     FPages: TPages;
  500.     FSysInfo: TMSystemInfo;
  501.     FShowRepBut: Boolean;
  502.     procedure SetPages(const Value: TPages);
  503.     procedure SetShowRepBut(const Value: Boolean);
  504.     procedure SetCaptionText(const Value: string);
  505.   public
  506.     Report :TStringList;
  507.  
  508.     property DisplayedPages: TPages read FPages write SetPages;
  509.     property SysInfo: TMSystemInfo read FSysInfo write FSysInfo;
  510.     property ShowReportButton: Boolean read FShowRepBut write SetShowRepBut;
  511.     property CaptionText: string Write SetCaptionText;
  512.  
  513.     procedure GetInfo;
  514.  
  515.     procedure GetWkstaInfo;
  516.     procedure GetOSInfo;
  517.     procedure GetCPUInfo;
  518.     procedure GetMemoryInfo;
  519.     procedure GetDisplayInfo;
  520.     procedure GetAPMInfo;
  521.     procedure GetMediaInfo;
  522.     procedure GetNetInfo;
  523.     procedure GetDeviceInfo;
  524.     procedure GetEngInfo;
  525.     procedure GetDriveInfo;
  526.     procedure GetTZInfo;
  527.     procedure GetPrintInfo;
  528.     procedure GetStartupInfo;
  529.     procedure GetSWInfo;
  530.   end;
  531.  
  532. var
  533.   frmMSI_Overview: TfrmMSI_Overview;
  534.  
  535. implementation
  536.  
  537. uses ShellAPI, MiTeC_Routines, MSI_Devices, MSI_DetailDlg, MSI_OS, MSI_APM,
  538.   MSI_Startup, MSI_Common, MiTeC_Dialogs, MiTeC_Datetime, MSI_SMBIOS;
  539.  
  540. {$R *.DFM}
  541.  
  542. const
  543.   cDeviceImageIndex: array[TDeviceClass] of integer =
  544.                       (iiAPM, iiSystem, iiVolumes, iiDisplay, iiCDROM, iiVolumes,
  545.                        iiFDD, iiGPS, iiHID, iiVolumes, iiDriver, iiImaging,
  546.                        iiInfrared, iiKeyboard, iiChanger, iiDriver, iiMouse, iiModem,
  547.                        iiMonitor, iiReader, iiPort, iiAdapter, iiDriver,
  548.                        iiPackage, iiDriver, iiAdapter, iiPort, iiPrinter, iiSCSI,
  549.                        iiReader, iiSound, iiHDD, iiSystem, iiTape, iiController,
  550.                        iiTape, iiUSB);
  551.  
  552. { TfrmMSI_Overview }
  553.  
  554. procedure TfrmMSI_Overview.GetWkstaInfo;
  555. var
  556.   i: Integer;
  557. begin
  558.   with SysInfo.Machine do begin
  559.     if Trim(Computer)<>'' then
  560.       eMachine.Text:=' '+Computer+' ';
  561.     eWksta.text:=Name;
  562.     eUser.text:=User;
  563.     eLastBoot.text:=datetimetostr(LastBoot);
  564.     eSysTime.text:=formatseconds(SystemUpTime,true,false,false);
  565.     if NumLock then
  566.       pNumLock.color:=clLime
  567.     else
  568.       pNumLock.color:=clSilver;
  569.     if CapsLock then
  570.       pCapsLock.color:=clLime
  571.     else
  572.       pCapsLock.color:=clSilver;
  573.     if ScrollLock then
  574.       pScrollLock.color:=clLime
  575.     else
  576.       pScrollLock.color:=clSilver;
  577.  
  578.     with SMBIOS do begin
  579.       eSMVer.Text:=Version;
  580.       eSMTables.Text:=Format('%d',[Length(StructTables)]);
  581.  
  582.       eBIOSVendor.Text:=BIOSVendor;
  583.       eBIOSVer.Text:=BIOSVersion;
  584.       eBIOSDate.Text:=BIOSDate;
  585.       eBIOSSize.Text:=Format('%d',[BIOSSize]);
  586.  
  587.       eSysMod.Text:=SystemModel;
  588.       eSysMan.Text:=SystemManufacturer;
  589.       eSysVer.Text:=SystemVersion;
  590.       eSysSer.Text:=SystemSerial;
  591.       eSysID.Text:=SystemUUID;
  592.  
  593.       eMBMod.Text:=MainBoardModel;
  594.       eMBMan.Text:=MainBoardManufacturer;
  595.       eMBVer.Text:=MainBoardVersion;
  596.       eMBSer.Text:=MainBoardSerial;
  597.  
  598.       eCHMod.Text:=ChassisModel;
  599.       eCHMan.Text:=ChassisManufacturer;
  600.       eCHVer.Text:=ChassisVersion;
  601.       eCHSer.Text:=ChassisSerial;
  602.  
  603.       eCPUMan.Text:=CPUManufacturer;
  604.       eCPU.Text:=CPUVersion;
  605.       eSocket.Text:=CPUSocket;
  606.       eUpgIntf.Text:=CPUUpgrade;
  607.       eVolt.Text:=Format('%1.1f',[CPUVoltage]);
  608.       eClock.Text:=Format('%d',[CPUClock]);
  609.       eExtClk.Text:=Format('%d',[CPUExternalClock]);
  610.  
  611.       lvCache.Items.Clear;
  612.       for i:=0 to CacheCount-1 do
  613.         with lvCache.Items.Add do begin
  614.           Caption:=Cache[i].Designation;
  615.           SubItems.Add(CacheTypes[Cache[i].Typ]);
  616.           SubItems.Add(CacheAssociativities[Cache[i].Associativity]);
  617.           SubItems.Add(SRAMTypes[Cache[i].SRAMType]);
  618.           SubItems.Add(Format('%d KB',[Cache[i].InstalledSize]));
  619.           SubItems.Add(Format('%d KB',[Cache[i].MaxSize]));
  620.           SubItems.Add(Format('%d ns',[Cache[i].Speed]));
  621.           ImageIndex:=iiMemory;
  622.         end;
  623.  
  624.       lvMem.Items.Clear;
  625.       for i:=0 to MemorySlotCount-1 do
  626.         with lvMem.Items.Add do begin
  627.           Caption:=MemoryBank[i].Socket;
  628.           SubItems.Add(GetMemoryTypeStr(MemoryBank[i].Types));
  629.           SubItems.Add(Format('%d MB',[MemoryBank[i].Size]));
  630.           SubItems.Add(Format('%d ns',[MemoryBank[i].Speed]));
  631.           ImageIndex:=iiMemory;
  632.         end;
  633.  
  634.       lvPort.Items.Clear;
  635.       for i:=0 to PortCount-1 do
  636.         with lvPort.Items.Add do begin
  637.           Caption:=Port[i].Designator;
  638.           SubItems.Add(PortTypes[Port[i].Typ]);
  639.           SubItems.Add(ConnectorTypes[Port[i].Connector]);
  640.           ImageIndex:=iiPort;
  641.         end;
  642.  
  643.       lvSlot.Items.Clear;
  644.       for i:=0 to SystemSlotCount-1 do
  645.         with lvSlot.Items.Add do begin
  646.           Caption:=SlotTypes[SystemSlot[i].Typ];
  647.           SubItems.Add(DataBusTypes[SystemSlot[i].DataBus]);
  648.           ImageIndex:=iiAdapter;
  649.         end;
  650.  
  651.       lvTables.Items.Clear;
  652.       for i:=0 to High(StructTables) do
  653.         with lvTables.Items.Add do begin
  654.           Caption:=Format('Type %d: %s',[StructTables[i].Indicator,StructTables[i].Name]);
  655.           SubItems.Add(Format('%d',[StructTables[i].Length]));
  656.           SubItems.Add(Format('%4.4x',[StructTables[i].Handle]));
  657.           ImageIndex:=-1;
  658.         end;
  659.     end;
  660.   end;
  661. end;
  662.  
  663. procedure TfrmMSI_Overview.GetOSInfo;
  664. var
  665.   i: integer;
  666.   s: string;
  667. begin
  668.   with SysInfo.OS do begin
  669.     s:=OSVersion;
  670.     case Platform of
  671.       opWin31: tsOS.Caption:='Windows 3.1x';
  672.       opWin9x: tsOS.Caption:='Windows 9x';
  673.       opWinNT: tsOS.Caption:='Windows NT';
  674.     end;
  675.     if IsNT then begin
  676.       case NTSpecific.ProductType of
  677.         ptWorkstation: s:=s+' - Workstation';
  678.         ptServer: s:=s+' - Server';
  679.         ptAdvancedServer: s:=s+' - Advanced Server';
  680.       end;
  681.       lCSD.caption:=CSD;
  682.     end;
  683.  
  684.     lVersion.caption:=s;
  685.     lVerNo.caption:=format('Version: %d.%d.%d',[MajorVersion,MinorVersion,BuildNumber]);
  686.  
  687.     bNTSpec.Enabled:=Is2K or IsXP;
  688.     lCSD.caption:=CSDEx;
  689.     ePID.text:=ProductID;
  690.     ePKey.text:=ProductKey;
  691.     eRegUser.text:=RegisteredUser;
  692.     eRegOrg.text:=RegisteredOrg;
  693.     lDVD.Caption:='DVD Region: '+DVDRegion;
  694.  
  695.     FolderList.Items.Clear;
  696.     for i:=0 to Folders.Count-1 do
  697.       if Folders.Values[Folders.Names[i]]<>'' then
  698.         with FolderList.Items.Add do begin
  699.           Caption:=Folders.Names[i];
  700.           SubItems.Add(Folders.Values[Folders.Names[i]]);
  701.         end;
  702.  
  703.     LocaleList.Items.Clear;
  704.     with LocaleList.Items.Add do begin
  705.       Caption:='Abbreviate Country Code';
  706.       SubItems.Add(LocaleInfo.AbbreviateCountryCode);
  707.     end;
  708.     with LocaleList.Items.Add do begin
  709.       Caption:='Abbreviate Language Code';
  710.       SubItems.Add(LocaleInfo.AbbreviateLanguageName);
  711.     end;
  712.     with LocaleList.Items.Add do begin
  713.       Caption:='Country Code';
  714.       SubItems.Add(LocaleInfo.CountryCode);
  715.     end;
  716.     with LocaleList.Items.Add do begin
  717.       Caption:='Currency Decimal Digits';
  718.       SubItems.Add(LocaleInfo.CurrencyDecimalDigits);
  719.     end;
  720.  
  721.     with LocaleList.Items.Add do begin
  722.       Caption:='Full Country Code';
  723.       SubItems.Add(LocaleInfo.FullCountryCode);
  724.     end;
  725.     with LocaleList.Items.Add do begin
  726.       Caption:='Full English Language Name';
  727.       SubItems.Add(LocaleInfo.FullLanguageEnglishName);
  728.     end;
  729.     with LocaleList.Items.Add do begin
  730.       Caption:='Full Localize Language Name';
  731.       SubItems.Add(LocaleInfo.FullLocalizeLanguage);
  732.     end;
  733.     with LocaleList.Items.Add do begin
  734.       Caption:='Intl. Monetary Symbol';
  735.       SubItems.Add(LocaleInfo.InternationalMonetarySymbol);
  736.     end;
  737.     with LocaleList.Items.Add do begin
  738.       Caption:='Local Monetary Symbol';
  739.       SubItems.Add(LocaleInfo.LocalMonetarySymbol);
  740.     end;
  741.     with LocaleList.Items.Add do begin
  742.       Caption:='Positive Currency Mode';
  743.       case LocaleInfo.PositiveCurrencyMode of
  744.         Prefix_No_Separation: SubItems.Add('Prefix_No_Separation');
  745.         Suffix_No_Separation: SubItems.Add('Suffix_No_Separation');
  746.         Prefix_One_Char_Separation: SubItems.Add('Prefix_One_Char_Separation');
  747.         Suffix_One_Char_Separation: SubItems.Add('Suffix_One_Char_Separation');
  748.       end;
  749.     end;
  750.     with LocaleList.Items.Add do begin
  751.       Caption:='Negative Currency Mode';
  752.       SubItems.Add(LocaleInfo.NegativeCurrencyMode);
  753.     end;
  754.     with LocaleList.Items.Add do begin
  755.       Caption:='Currency Decimal Separator';
  756.       SubItems.Add(LocaleInfo.CurrencyDecimalSeparator);
  757.     end;
  758.     with LocaleList.Items.Add do begin
  759.       Caption:='Currency Thousand Separator';
  760.       SubItems.Add(LocaleInfo.CurrencyThousandSeparator);
  761.     end;
  762.     with LocaleList.Items.Add do begin
  763.       Caption:='Decimal Separator';
  764.       SubItems.Add(LocaleInfo.DecimalSeparator);
  765.     end;
  766.     with LocaleList.Items.Add do begin
  767.       Caption:='Number Of Decimal Digits';
  768.       SubItems.Add(LocaleInfo.NumberOfDecimalDigits);
  769.     end;
  770.     with LocaleList.Items.Add do begin
  771.       Caption:='List Separator';
  772.       SubItems.Add(LocaleInfo.ListSeparator);
  773.     end;
  774.     with LocaleList.Items.Add do begin
  775.       Caption:='Date Separator';
  776.       SubItems.Add(LocaleInfo.DateSeparator);
  777.     end;
  778.     with LocaleList.Items.Add do begin
  779.       Caption:='Long Date Order';
  780.       case LocaleInfo.LongDateOrder of
  781.         MDY: SubItems.Add('M-D-Y');
  782.         DMY: SubItems.Add('D-M-Y');
  783.         YMD: SubItems.Add('Y-M-D');
  784.       end;
  785.     end;
  786.     with LocaleList.Items.Add do begin
  787.       Caption:='Short Date Order';
  788.       case LocaleInfo.ShortDateOrder of
  789.         MDY: SubItems.Add('M-D-Y');
  790.         DMY: SubItems.Add('D-M-Y');
  791.         YMD: SubItems.Add('Y-M-D');
  792.       end;
  793.     end;
  794.     with LocaleList.Items.Add do begin
  795.       Caption:='Short Date Format';
  796.       SubItems.Add(LocaleInfo.ShortDateFormat);
  797.     end;
  798.     with LocaleList.Items.Add do begin
  799.       Caption:='Time Format';
  800.       SubItems.Add(LocaleInfo.TimeFormat);
  801.     end;
  802.     with LocaleList.Items.Add do begin
  803.       Caption:='Time Format Specifier';
  804.       case LocaleInfo.TimeFormatSpecifier of
  805.         H12: SubItems.Add('12H');
  806.         H24: SubItems.Add('24H');
  807.       end;
  808.     end;
  809.     with LocaleList.Items.Add do begin
  810.       Caption:='Year Format';
  811.       case LocaleInfo.YearFormat of
  812.         TwoDigit: SubItems.Add('Two Digit');
  813.         FourDigit: SubItems.Add('Four Digit');
  814.       end;
  815.     end;
  816.     with LocaleList.Items.Add do begin
  817.       Caption:='Measurement System';
  818.       case LocaleInfo.MeasurementSystem of
  819.         Metric: SubItems.Add('Metric');
  820.         US: SubItems.Add('U.S.');
  821.       end;
  822.     end;
  823.  
  824.     eBrowser.Text:=Internet.DefaultBrowser;
  825.     eMail.Text:=Internet.DefaultMailClient;
  826.     eProxy.Text:=Internet.ProxyServer;
  827.     lCT.Caption:=Internet.GetConnTypeStr(Internet.ConnectionType);
  828.   end;
  829. end;
  830.  
  831. procedure TfrmMSI_Overview.GetCPUInfo;
  832. var
  833.   sl :TStringList;
  834.   i :Longint;
  835. begin
  836.   with SysInfo.CPU do begin
  837.     lCPU.caption:=format('%d x %s %s - %d MHz',[Count,Trim(Vendor),Trim(VendorID),Frequency]);
  838.     lVendor.Caption:='Vendor: '+VendorEx;
  839.     lSerial.caption:='Serial Number: '+SerialNumber;
  840.     lCodename.Caption:='Code Name: '+Codename;
  841.     lModel.caption:=format('Family %d  Model %d  Stepping %d',[Family,Model,Stepping]);
  842.     sl:=TStringList.Create;
  843.     Features.Report(sl);
  844.     sl.Add(Format('FDIV Bug=%d',[integer(FDIVBug)]));
  845.     clbCPU.items.Clear;
  846.     for i:=1 to sl.count-1 do begin
  847.       clbCPU.items.Add(sl.Names[i]);
  848.       clbCPU.Checked[clbCPU.items.count-1]:=Boolean(StrToInt(sl.Values[sl.Names[i]]));
  849.     end;
  850.     sl.Free;
  851.     lL1Data.Caption:=Format('Level 1 Data Cache: %d Kb',[Cache.L1Data]);
  852.     lL1Code.Caption:=Format('Level 1 Instruction Cache: %d Kb',[Cache.L1Code]);
  853.     lLevel1.Caption:=Format('Level 1 Unified Cache: %d Kb',[Cache.Level1]);
  854.     lLevel2.Caption:=Format('Level 2 Unified Cache: %d Kb',[Cache.Level2]);
  855.     lCacheDesc.Caption:=Cache.IntelDescription;
  856.   end;
  857. end;
  858.  
  859. procedure TfrmMSI_Overview.GetMemoryInfo;
  860. begin
  861.   pcMem.ActivePage:=tsmemGen;
  862.   with SysInfo.Memory do begin
  863.     eAG.text:=formatfloat('#,##',AllocGranularity);
  864.     eAppAddr.text:=format('%s - %s',[inttohex(MinAppAddress,8),inttohex(MaxAppAddress,8)]);
  865.     ePS.text:=formatfloat('#,##',PageSize);
  866.   end;
  867. end;
  868.  
  869. procedure TfrmMSI_Overview.GetDisplayInfo;
  870. begin
  871.   with SysInfo, Display do begin
  872.     cbDisplay.Text:=Adapter;
  873.     eChip.text:=Chipset;
  874.     eDAC.text:=DAC;
  875.     eMem.text:=IntToStr(Memory);
  876.     eBIOS.text:=format('%s (%s)',[BIOSVersion,BIOSDate]);
  877.     lTechnology.caption:='Technology: '+Technology;
  878.     lMetrics.caption:=format('Metrics: %d x %d - %d bit',[HorzRes,VertRes,ColorDepth]);
  879.     lPixWidth.caption:=format('Pixel Width: %d',[PixelWidth]);
  880.     lPixHeight.caption:=format('Pixel Height: %d',[PixelHeight]);
  881.     lPixDiag.caption:=format('Pixel Diagonal: %d',[PixelDiagonal]);
  882.     lFontRes.caption:=format('Font Resolution: %d dpi',[FontResolution]);
  883.   end;
  884. end;
  885.  
  886. procedure TfrmMSI_Overview.GetAPMInfo;
  887. begin
  888.   with SysInfo.APM do begin
  889.     eAC.text:=GetACPSStr(ACPowerStatus);
  890.     eBat.text:=GetBSStr(BatteryChargeStatus);
  891.     if BatteryLifePercent<=100 then begin
  892.       eBatFull.text:=formatseconds(BatteryLifeFullTime,true,false,false);
  893.       eBatLife.text:=formatseconds(BatteryLifeTime,true,false,false);
  894.       gAPM.Progress:=BatteryLifePercent;
  895.     end else begin
  896.       eBatFull.text:='<info not available>';
  897.       eBatLife.text:='<info not available>';
  898.     end;
  899.   end;
  900. end;
  901.  
  902. procedure TfrmMSI_Overview.GetMediaInfo;
  903. var
  904.   i :integer;
  905. begin
  906.   with SysInfo.Media do begin
  907.     lvMedia.Items.beginUpdate;
  908.     lvMedia.items.clear;
  909.     for i:=0 to Devices.count-1 do
  910.       with lvMedia.items.add do begin
  911.         caption:=Devices[i];
  912.         if i=GamePortIndex then
  913.           imageindex:=iiGame
  914.         else
  915.           if i=SoundCardIndex then
  916.             imageindex:=iiAdapter
  917.           else
  918.             imageindex:=iiSound;
  919.       end;
  920.     lvMedia.Items.EndUpdate;
  921.     lvSound.Items.beginUpdate;
  922.     lvSound.items.clear;
  923.     for i:=0 to WaveIn.count-1 do
  924.       with lvSound.items.add do begin
  925.         caption:=WaveIn[i];
  926.         SubItems.Add('Wave In');
  927.         ImageIndex:=iiWave;
  928.       end;
  929.     for i:=0 to WaveOut.count-1 do
  930.       with lvSound.items.add do begin
  931.         caption:=WaveOut[i];
  932.         SubItems.Add('Wave Out');
  933.         ImageIndex:=iiWave;
  934.       end;
  935.     for i:=0 to MIDIIn.count-1 do
  936.       with lvSound.items.add do begin
  937.         caption:=MIDIIn[i];
  938.         SubItems.Add('MIDI In');
  939.         ImageIndex:=iiMIDI;
  940.       end;
  941.     for i:=0 to MIDIOut.count-1 do
  942.       with lvSound.items.add do begin
  943.         caption:=MIDIOut[i];
  944.         SubItems.Add('MIDI Out');
  945.         ImageIndex:=iiMIDI;
  946.       end;
  947.     for i:=0 to AUX.count-1 do
  948.       with lvSound.items.add do begin
  949.         caption:=AUX[i];
  950.         SubItems.Add('AUX');
  951.         ImageIndex:=iiAUX;
  952.       end;
  953.     for i:=0 to Mixer.count-1 do
  954.       with lvSound.items.add do begin
  955.         caption:=Mixer[i];
  956.         SubItems.Add('Mixer');
  957.         ImageIndex:=iiMixer;
  958.       end;
  959.   end;
  960.   lvSound.Items.endUpdate;
  961. end;
  962.  
  963. procedure TfrmMSI_Overview.GetNetInfo;
  964. var
  965.   i :integer;
  966. begin
  967.   with SysInfo.Network do begin
  968.     pcNet.ActivePage:=tsNetGeneral;
  969.     lvNetwork.items.clear;
  970.     for i:=0 to Adapters.count-1 do
  971.       with lvNetwork.items.add do begin
  972.         caption:=Adapters[i];
  973.         if CardAdapterIndex=i then
  974.           imageindex:=iiAdapter
  975.         else
  976.           imageindex:=iiNet;
  977.       end;
  978.     lbIP.Items.Text:=IPAddresses.Text;
  979.     lbMAC.Items.Text:=MACAddresses.Text;
  980.     eWSDesc.Text:=Winsock.Description;
  981.     eWSVer.Text:=Format('%d.%d',[Winsock.MajorVersion,Winsock.MinorVersion]);
  982.     eWSStat.Text:=Winsock.Status;
  983.     with TCPIP do begin
  984.       eDomain.Text:=DomainName;
  985.       eHost.Text:=HostName;
  986.       cbxProxy.Checked:=EnableProxy;
  987.       cbxRouting.Checked:=EnableRouting;
  988.       cbxDNS.Checked:=EnableDNS;
  989.       cbAdapters.Items.Clear;
  990.       for i:=0 to AdapterCount-1 do
  991.         cbAdapters.Items.Add(Adapter[i].Name);
  992.       cbAdapters.ItemIndex:=0;
  993.       cbAdaptersChange(nil);
  994.     end;
  995.   end;
  996. end;
  997.  
  998. procedure TfrmMSI_Overview.GetDeviceInfo;
  999. var
  1000.   i,c: integer;
  1001.   r,n: TTreeNode;
  1002.   cn,dn: string;
  1003.   pi: PInteger;
  1004.   ldc: TDeviceClass;
  1005. begin
  1006.   with SysInfo, Devices, Tree,Items do begin
  1007.     c:=DeviceCount-1;
  1008.     BeginUpdate;
  1009.     while Count>0 do begin
  1010.       if Assigned(Items[Count-1].Data) then
  1011.         FreeMem(Items[Count-1].Data);
  1012.       Delete(Items[Count-1]);
  1013.     end;
  1014.     r:=Add(nil,GetMachine);
  1015.     r.ImageIndex:=0;
  1016.     r.SelectedIndex:=r.ImageIndex;
  1017.     n:=nil;
  1018.     for i:=0 to c do begin
  1019.       if Trim(Devices[i].ClassDesc)<>'' then
  1020.         cn:=Devices[i].ClassDesc
  1021.       else
  1022.         cn:=Devices[i].ClassName;
  1023.       if not Assigned(n) or (Devices[i].DeviceClass<>ldc) then begin
  1024.         ldc:=Devices[i].DeviceClass;
  1025.         n:=AddChild(r,cn);
  1026.         n.ImageIndex:=cDeviceImageIndex[Devices[i].DeviceClass];
  1027.         n.SelectedIndex:=n.ImageIndex;
  1028.       end;
  1029.       if Trim(Devices[i].FriendlyName)='' then
  1030.         dn:=Devices[i].Description
  1031.       else
  1032.         dn:=Devices[i].FriendlyName;
  1033.       with AddChild(n,dn) do begin
  1034.         ImageIndex:=n.ImageIndex;
  1035.         SelectedIndex:=ImageIndex;
  1036.         new(pi);
  1037.         pi^:=i;
  1038.         Data:=pi;
  1039.       end;
  1040.       n.AlphaSort;
  1041.     end;
  1042.     r.AlphaSort;
  1043.     r.Expand(False);
  1044.     EndUpdate;
  1045.   end;
  1046. end;
  1047.  
  1048. procedure TfrmMSI_Overview.GetEngInfo;
  1049. var
  1050.   i: integer;
  1051. begin
  1052.   with SysInfo.Engines do begin
  1053.     if ODBC<>'' then
  1054.       lODBC.caption:='Open Database Connectivity '+ODBC
  1055.     else
  1056.       lODBC.caption:='Open Database Connectivity not found';
  1057.     if BDE<>'' then
  1058.       lBDE.caption:='Borland Database Engine '+BDE
  1059.     else
  1060.       lBDE.caption:='Borland Database Engine not found';
  1061.     if DAO<>'' then
  1062.       lDAO.caption:='Microsoft Data Access Objects '+DAO
  1063.     else
  1064.       lDAO.caption:='Microsoft Data Access Objects not found';
  1065.     if ADO<>'' then
  1066.       lADO.caption:='Microsoft ActiveX Data Objects '+ADO
  1067.     else
  1068.       lADO.caption:='Microsoft ActiveX Data Objects not found';
  1069.   end;
  1070.   with SysInfo.Engines.DirectX do begin
  1071.     if Version<>'' then begin
  1072.       lDirectX.caption:='Installed version: '+Version;
  1073.       lvDirectX.Items.beginUpdate;
  1074.       lvDirectX.items.clear;
  1075.       for i:=0 to Direct3D.count-1 do
  1076.         with lvDirectX.items.add do begin
  1077.           caption:=Direct3D[i];
  1078.           SubItems.Add('Direct3D');
  1079.           ImageIndex:=iiDirectX;
  1080.         end;
  1081.       for i:=0 to DirectMusic.count-1 do
  1082.         with lvDirectX.items.add do begin
  1083.           caption:=DirectMusic[i];
  1084.           SubItems.Add('DirectMusic');
  1085.           ImageIndex:=iiDirectX;
  1086.         end;
  1087.       for i:=0 to DirectPlay.count-1 do
  1088.         with lvDirectX.items.add do begin
  1089.           caption:=DirectPlay[i];
  1090.           SubItems.Add('DirectPlay');
  1091.           ImageIndex:=iiDirectX;
  1092.         end;
  1093.       lvDirectX.Items.endUpdate;
  1094.     end else
  1095.       lDirectX.caption:='Not installed.';
  1096.   end;
  1097.   with SysInfo.Engines.ASPI32 do begin
  1098.     if ASPI<>'' then
  1099.       lASPI.caption:='Adaptec ASPI '+ASPI
  1100.     else
  1101.       lASPI.caption:='Adaptec ASPI not found';
  1102.     //lvASPI.Items.beginUpdate;
  1103.     lvASPI.items.Clear;
  1104.     for i:=0 to Configuration.Adapter.Count-1 do
  1105.       with lvASPI.items.add do begin
  1106.         caption:=Configuration.Vendor[i]+Configuration.Product[i];
  1107.         SubItems.Add(Configuration.Revision[i]);
  1108.         SubItems.Add(Configuration.Adapter[i]);
  1109.         SubItems.Add(Configuration.ID[i]);
  1110.         SubItems.Add(Configuration.Typ[i]);
  1111.         SubItems.Add(Configuration.Spec[i]);
  1112.         ImageIndex:=-1;
  1113.       end;
  1114.     //lvASPI.Items.beginUpdate;
  1115.   end;
  1116. end;
  1117.  
  1118. procedure TfrmMSI_Overview.GetDriveInfo;
  1119. var
  1120.   i,j :integer;
  1121.   s :string;
  1122. begin
  1123.   j:=0;
  1124.   with SysInfo.Disk do begin
  1125.     cbDrive.items.clear;
  1126.     for i:=1 to length(AvailableDisks) do begin
  1127.       s:=uppercase(copy(AvailableDisks,i,1));
  1128.       cbDrive.items.add(s+':');
  1129.       if s=uppercase(copy(SysInfo.OS.Folders.Values['Windows'],1,1)) then
  1130.         j:=i-1;
  1131.     end;
  1132.     cbDrive.itemindex:=j;
  1133.     cbDriveChange(nil);
  1134.   end;
  1135. end;
  1136.  
  1137. procedure TfrmMSI_Overview.GetInfo;
  1138. begin
  1139.   screen.cursor:=crhourglass;
  1140.   try
  1141.     if pgWksta in DisplayedPages then
  1142.       GetWkstaInfo;
  1143.     if pgOS in DisplayedPages then
  1144.       GetOSInfo;
  1145.     if pgCPU in DisplayedPages then
  1146.       GetCPUInfo;
  1147.     if pgMem in DisplayedPages then
  1148.       GetMemoryInfo;
  1149.     if pgDisplay in DisplayedPages then
  1150.       GetDisplayInfo;
  1151.     if pgAPM in DisplayedPages then
  1152.       GetAPMInfo;
  1153.     if pgMedia in DisplayedPages then
  1154.       GetMediaInfo;
  1155.     if pgNet in DisplayedPages then
  1156.       GetNetInfo;
  1157.     if pgDev in DisplayedPages then
  1158.       GetDeviceInfo;
  1159.     if pgEng in DisplayedPages then
  1160.       GetEngInfo;
  1161.     if pgDisk in DisplayedPages then
  1162.       GetDriveInfo;
  1163.     if pgTZ in DisplayedPages then
  1164.       GetTZInfo;
  1165.     if pgPrn in DisplayedPages then
  1166.       GetPrintInfo;
  1167.     if pgStartup in DisplayedPages then
  1168.       GetStartupInfo;
  1169.     if pgSoftware in DisplayedPages then
  1170.       GetSWInfo;
  1171.   finally
  1172.     screen.cursor:=crdefault;
  1173.   end;
  1174. end;
  1175.  
  1176. procedure TfrmMSI_Overview.FormCreate(Sender: TObject);
  1177. begin
  1178.   Report:=TStringList.Create;
  1179.   DisplayedPages:=pgAll;
  1180.   pc.activepage:=tsWksta;
  1181.   pcCPU.ActivePage:=tsID;
  1182.   pcMachine.ActivePage:=tsMachineGeneral;
  1183.   pcSM.ActivePage:=tsSMSystem;
  1184.   lTitle.Caption:=cCompName;
  1185.   lVer.Caption:='Version '+cVersion;
  1186.   FooterPanel.Caption:=cCopyright;
  1187.   pcOS.ActivePage:=tsGeneral;
  1188.   pcEng.ActivePage:=tsDirectX;
  1189. end;
  1190.  
  1191. procedure TfrmMSI_Overview.cmRefresh(Sender: TObject);
  1192. begin
  1193.   screen.cursor:=crhourglass;
  1194.   try
  1195.     SysInfo.Refresh;
  1196.     GetInfo;
  1197.   finally
  1198.     screen.cursor:=crdefault;
  1199.   end;
  1200. end;
  1201.  
  1202. procedure TfrmMSI_Overview.cmClose(Sender: TObject);
  1203. begin
  1204.   close;
  1205. end;
  1206.  
  1207. procedure TfrmMSI_Overview.cmEnvironment(Sender: TObject);
  1208. var
  1209.   i: integer;
  1210. begin
  1211.   with TdlgMSI_Detail.Create(Self) do begin
  1212.     Notebook.pageindex:=3;
  1213.     TitlePanel.Caption:='Environment';
  1214.     for i:=0 to SysInfo.OS.Environment.Count-1 do
  1215.       with lv.Items.Add do begin
  1216.         Caption:=SysInfo.OS.Environment.Names[i];
  1217.         SubItems.Add(SysInfo.OS.Environment.Values[SysInfo.OS.Environment.Names[i]]);
  1218.       end;
  1219.     showmodal;
  1220.     free;
  1221.   end;
  1222. end;
  1223.  
  1224. procedure TfrmMSI_Overview.cmCaps(Sender: TObject);
  1225. var
  1226.   i :integer;
  1227.   sl :TStringList;
  1228. begin
  1229.   with TdlgMSI_Detail.Create(self) do begin
  1230.     Notebook.pageindex:=1;
  1231.     sl:=TStringList.Create;
  1232.     case TComponent(sender).tag of
  1233.       0: begin
  1234.         TitlePanel.Caption:='Curve Capabilities';
  1235.         SysInfo.Display.Report_CurveCaps(sl);
  1236.       end;
  1237.       1: begin
  1238.         TitlePanel.Caption:='Line Capabilities';
  1239.         SysInfo.Display.Report_LineCaps(sl);
  1240.       end;
  1241.       2: begin
  1242.         TitlePanel.Caption:='Polygonal Capabilities';
  1243.         SysInfo.Display.Report_PolygonCaps(sl);
  1244.       end;
  1245.       3: begin
  1246.         TitlePanel.Caption:='Raster Capabilities';
  1247.         SysInfo.Display.Report_RasterCaps(sl);
  1248.       end;
  1249.       4: begin
  1250.         TitlePanel.Caption:='Text Capabilities';
  1251.         SysInfo.Display.Report_TextCaps(sl);
  1252.       end;
  1253.     end;
  1254.     clb.items.clear;
  1255.     for i:=1 to sl.count-1 do begin
  1256.       clb.items.Add(sl.Names[i]);
  1257.       clb.Checked[clb.items.count-1]:=Boolean(StrToInt(sl.Values[sl.Names[i]]));
  1258.     end;
  1259.     sl.free;
  1260.     showmodal;
  1261.     free;
  1262.   end;
  1263. end;
  1264.  
  1265. procedure TfrmMSI_Overview.cmPrintSetup(Sender: TObject);
  1266. begin
  1267.   psd.execute;
  1268. end;
  1269.  
  1270.  
  1271. procedure TfrmMSI_Overview.cbDriveChange(Sender: TObject);
  1272. var
  1273.   p,i :Word;
  1274.   b :pchar;
  1275.   sl :TStringList;
  1276. begin
  1277.   with SysInfo.Disk do begin
  1278.     gdisk.progress:=0;
  1279.     b:=stralloc(255);
  1280.     p:=0;
  1281.     Drive:=copy(cbDrive.text,1,2);
  1282.     strpcopy(b,Drive+'\');
  1283.     lDriveType.caption:=GetMediaTypeStr(MediaType)+' - '+FileSystem;
  1284.     if MediaPresent then
  1285.       imgDrive.picture.icon.handle:=extractassociatedicon(hinstance,b,p)
  1286.     else
  1287.       imgDrive.picture.icon.handle:=0;
  1288.     strdispose(b);
  1289.     eUNC.text:=expanduncfilename(Drive);
  1290.     eDSN.text:=SerialNumber;
  1291.     if pos('[',cbdrive.items[cbdrive.itemindex])=0 then begin
  1292.       i:=cbdrive.itemindex;
  1293.       cbdrive.items[i]:=cbdrive.items[i]+' ['+VolumeLabel+']';
  1294.       cbdrive.itemindex:=i;
  1295.     end;
  1296.     lCapacity.caption:=formatfloat('Capacity: #,#0 B',Capacity);
  1297.     lFree.caption:=formatfloat('Free space: #,#0 B',FreeSpace);
  1298.     try
  1299.       gDisk.Progress:=round((Capacity-FreeSpace)/Capacity*100);
  1300.     except
  1301.     end;
  1302.     lBPS.caption:=formatfloat('Bytes/sector: 0',BytesPerSector);
  1303.     lSPC.caption:=formatfloat('Sector/cluster: 0',SectorsPerCluster);
  1304.     lFC.caption:=formatfloat('Free clusters: #,#0',FreeClusters);
  1305.     lTC.caption:=formatfloat('Total clusters: #,#0',TotalClusters);
  1306.     sl:=TStringList.Create;
  1307.     Report_FileFlags(sl);
  1308.     clbFlags.items.Clear;
  1309.     for i:=1 to sl.count-1 do begin
  1310.       clbFlags.items.Add(sl.Names[i]);
  1311.       clbFlags.Checked[clbFlags.items.count-1]:=Boolean(StrToInt(sl.Values[sl.Names[i]]));
  1312.     end;
  1313.     sl.Free;
  1314.   end;
  1315. end;
  1316.  
  1317. procedure TfrmMSI_Overview.cmReportClick(Sender: TObject);
  1318. var
  1319.   p :tpoint;
  1320. begin
  1321.   p.y:=twincontrol(sender).top+twincontrol(sender).height;
  1322.   p.x:=twincontrol(sender).left;
  1323.   p:=twincontrol(sender).parent.clienttoscreen(p);
  1324.   ReportMenu.Popup(p.x,p.y);
  1325. end;
  1326.  
  1327. procedure TfrmMSI_Overview.cmReportAll(Sender: TObject);
  1328. begin
  1329.   Report.Clear;
  1330.   SelectedFilename:='SystemInfo.txt';
  1331.   if GetFileSaveDlg(Handle,LastDir,SelectedFilename,allFilter,ofnTitle) then begin
  1332.     SysInfo.Report(Report);
  1333.     Report.savetofile(SelectedFilename);
  1334.   end;
  1335. end;
  1336.  
  1337. procedure TfrmMSI_Overview.cmReportCurrent(Sender: TObject);
  1338. begin
  1339.   Report.Clear;
  1340.   SelectedFilename:=Trim(pc.ActivePage.Caption)+'.txt';
  1341.   if GetFileSaveDlg(Handle,LastDir,SelectedFilename,allFilter,ofnTitle) then begin
  1342.     case pc.activepage.pageindex of
  1343.       0: SysInfo.Machine.Report(Report);
  1344.       1: SysInfo.OS.Report(Report);
  1345.       2: SysInfo.CPU.Report(Report);
  1346.       3: SysInfo.Memory.Report(Report);
  1347.       4: SysInfo.Display.Report(Report);
  1348.       5: SysInfo.APM.Report(Report);
  1349.       6: SysInfo.Media.Report(Report);
  1350.       7: SysInfo.Network.Report(Report);
  1351.       8: SysInfo.Devices.Report(Report);
  1352.       9: SysInfo.Printers.Report(Report);
  1353.       10: SysInfo.Engines.Report(Report);
  1354.       11: SysInfo.Disk.Report(Report);
  1355.       12: SysInfo.OS.TimeZone.Report(Report);
  1356.       13: SysInfo.Startup.Report(Report);
  1357.       14: SysInfo.Software.Report(Report);
  1358.     end;
  1359.     Report.Insert(0,';'+SysInfo.About);
  1360.     Report.savetofile(Selectedfilename);
  1361.   end;
  1362. end;
  1363.  
  1364. procedure TfrmMSI_Overview.clbClickCheck(Sender: TObject);
  1365. var
  1366.   OCC: TNotifyEvent;
  1367.   idx: integer;
  1368.   p: TPoint;
  1369. begin
  1370.   with TCheckListBox(Sender) do begin
  1371.     OCC:=OnClickCheck;
  1372.     OnClickCheck:=nil;
  1373.     GetCursorPos(p);
  1374.     p:=ScreenToClient(p);
  1375.     idx:=ItemAtPos(p,True);
  1376.     if idx>-1 then
  1377.       Checked[idx]:=not Checked[idx];
  1378.     OnClickCheck:=OCC;
  1379.   end;
  1380. end;
  1381.  
  1382. procedure TfrmMSI_Overview.SetPages(const Value: TPages);
  1383. var
  1384.   i: integer;
  1385. begin
  1386.   FPages:=Value;
  1387.   for i:=pc.PageCount-1 downto 0 do begin
  1388.     pc.Pages[i].TabVisible:=TPage(i) in DisplayedPages;
  1389.     if pc.Pages[i].TabVisible then
  1390.       pc.ActivePage:=pc.Pages[i];
  1391.   end;
  1392. end;
  1393.  
  1394. procedure TfrmMSI_Overview.SetShowRepBut(const Value: Boolean);
  1395. begin
  1396.   FShowRepBut:=Value;
  1397.   bReport.Visible:=FShowRepBut;
  1398. end;
  1399.  
  1400. procedure TfrmMSI_Overview.cmModes(Sender: TObject);
  1401. var
  1402.   i: integer;
  1403. begin
  1404.   with TdlgMSI_Detail.Create(self) do begin
  1405.     Notebook.pageindex:=1;
  1406.     clb.items.clear;
  1407.     clb.Items.AddStrings(SysInfo.Display.Modes);
  1408.     for i:=0 to clb.Items.Count-1 do
  1409.       clb.Checked[i]:=True;
  1410.     TitlePanel.Caption:='Supported Video Modes';
  1411.     showmodal;
  1412.     free;
  1413.   end;
  1414. end;
  1415.  
  1416. procedure TfrmMSI_Overview.GetTZInfo;
  1417. begin
  1418.   with SysInfo.OS.TimeZone do begin
  1419.     eTZ.Text:=DisplayName;
  1420.     gbStd.Caption:=' '+StandardName+' ';
  1421.     gbDay.Caption:=' '+DaylightName+' ';
  1422.     eStdStart.Text:=DateTimeToStr(StandardStart);
  1423.     eStdBias.Text:=IntToStr(StandardBias);
  1424.     eDayStart.Text:=DateTimeToStr(DaylightStart);
  1425.     eDayBias.Text:=IntToStr(DaylightBias);
  1426.   end;
  1427. end;
  1428.  
  1429. procedure TfrmMSI_Overview.cmProto(Sender: TObject);
  1430. var
  1431.   i: integer;
  1432. begin
  1433.   with TdlgMSI_Detail.Create(self) do begin
  1434.     Notebook.pageindex:=1;
  1435.     clb.items.clear;
  1436.     clb.Items.AddStrings(SysInfo.Network.Protocols);
  1437.     for i:=0 to clb.Items.Count-1 do
  1438.       clb.Checked[i]:=True;
  1439.     TitlePanel.Caption:='Protocols';
  1440.     showmodal;
  1441.     free;
  1442.   end;
  1443. end;
  1444.  
  1445. procedure TfrmMSI_Overview.cmServ(Sender: TObject);
  1446. var
  1447.   i: integer;
  1448. begin
  1449.   with TdlgMSI_Detail.Create(self) do begin
  1450.     Notebook.pageindex:=1;
  1451.     clb.items.clear;
  1452.     clb.Items.AddStrings(SysInfo.Network.Services);
  1453.     for i:=0 to clb.Items.Count-1 do
  1454.       clb.Checked[i]:=True;
  1455.     TitlePanel.Caption:='Services';
  1456.     showmodal;
  1457.     free;
  1458.   end;
  1459. end;
  1460.  
  1461. procedure TfrmMSI_Overview.cmCli(Sender: TObject);
  1462. var
  1463.   i: integer;
  1464. begin
  1465.   with TdlgMSI_Detail.Create(self) do begin
  1466.     Notebook.pageindex:=1;
  1467.     clb.items.clear;
  1468.     clb.Items.AddStrings(SysInfo.Network.Clients);
  1469.     for i:=0 to clb.Items.Count-1 do
  1470.       clb.Checked[i]:=True;
  1471.     TitlePanel.Caption:='Clients';
  1472.     showmodal;
  1473.     free;
  1474.   end;
  1475. end;
  1476.  
  1477. procedure TfrmMSI_Overview.SetCaptionText(const Value: string);
  1478. begin
  1479.   Caption:=Value;
  1480. end;
  1481.  
  1482. procedure TfrmMSI_Overview.FormClose(Sender: TObject; var Action: TCloseAction);
  1483. begin
  1484.   Action:=caFree;
  1485. end;
  1486.  
  1487. procedure TfrmMSI_Overview.TreeChange(Sender: TObject; Node: TTreeNode);
  1488. begin
  1489.   bProps.Enabled:=Assigned(Node) and (Node.Level=2);
  1490. end;
  1491.  
  1492. procedure TfrmMSI_Overview.cmProps(Sender: TObject);
  1493. var
  1494.   dr: TDevice;
  1495.   i: integer;
  1496. begin
  1497.   if Assigned(Tree.Selected) and (Tree.Selected.Level=2) then
  1498.     with TdlgMSI_Detail.Create(self) do begin
  1499.       Notebook.pageindex:=3;
  1500.       lv.items.clear;
  1501.       i:=PInteger(Tree.Selected.Data)^;
  1502.       dr:=SysInfo.Devices.Devices[i];
  1503.       with lv.Items.Add do begin
  1504.         Caption:='Device Name';
  1505.         Subitems.Add(Tree.Selected.Text);
  1506.       end;
  1507.       with lv.Items.Add do begin
  1508.         Caption:='Class Name';
  1509.         Subitems.Add(dr.ClassName);
  1510.       end;
  1511.       with lv.Items.Add do begin
  1512.         Caption:='Class Description';
  1513.         Subitems.Add(Tree.Selected.Parent.Text);
  1514.       end;
  1515.       with lv.Items.Add do begin
  1516.         Caption:='Class GUID';
  1517.         Subitems.Add(dr.GUID);
  1518.       end;
  1519.       with lv.Items.Add do begin
  1520.         Caption:='Manufacturer';
  1521.         Subitems.Add(dr.Manufacturer);
  1522.       end;
  1523.       with lv.Items.Add do begin
  1524.         Caption:='Location';
  1525.         SubItems.Add(dr.Location);
  1526.       end;
  1527.       with lv.Items.Add do begin
  1528.         Caption:='HardwareID';
  1529.         Subitems.Add(dr.HardwareID);
  1530.       end;
  1531.       with lv.Items.Add do begin
  1532.         Caption:='Registry info';
  1533.         SubItems.Add(dr.Driver);
  1534.       end;
  1535.       with lv.Items.Add do begin
  1536.         Caption:='Driver Version';
  1537.         SubItems.Add(dr.DriverVersion);
  1538.       end;
  1539.       with lv.Items.Add do begin
  1540.         Caption:='Driver Date';
  1541.         SubItems.Add(dr.DriverDate);
  1542.       end;
  1543.       with lv.Items.Add do begin
  1544.         Caption:='Driver Provider';
  1545.         SubItems.Add(dr.DriverProvider);
  1546.       end;
  1547.       with lv.Items.Add do begin
  1548.         Caption:='Service Name';
  1549.         if dr.ServiceName='' then
  1550.           SubItems.Add(dr.Service)
  1551.         else
  1552.           SubItems.Add(dr.ServiceName);
  1553.       end;
  1554.       with lv.Items.Add do begin
  1555.         Caption:='Service Group';
  1556.         SubItems.Add(dr.ServiceGroup);
  1557.       end;
  1558.       TitlePanel.Caption:='Device Properties';
  1559.       showmodal;
  1560.       free;
  1561.     end;
  1562. end;
  1563.  
  1564. procedure TfrmMSI_Overview.cmMail(Sender: TObject);
  1565. begin
  1566.   ShellExecute(handle,'open',
  1567.                'mailto:mitec@atlas.cz?subject='+cCompName,
  1568.                nil,nil,SW_NORMAL);
  1569. end;
  1570.  
  1571. procedure TfrmMSI_Overview.GetPrintInfo;
  1572. var
  1573.   i: integer;
  1574. begin
  1575.   with SysInfo.Printers do begin
  1576.     lvPrinter.items.clear;
  1577.     for i:=0 to Names.count-1 do
  1578.       with lvPrinter.items.add do begin
  1579.         caption:=Names[i];
  1580.         SubItems.Add(Ports[i]);
  1581.         if Pos('\\',Ports[i])>0 then
  1582.           ImageIndex:=iiNetPrinter
  1583.         else
  1584.           ImageIndex:=iiPrinter;
  1585.         if i=DefaultIndex then
  1586.           ImageIndex:=ImageIndex+1;
  1587.       end;
  1588.   end;
  1589. end;
  1590.  
  1591. procedure TfrmMSI_Overview.tcStartupChange(Sender: TObject);
  1592. var
  1593.   i,n: integer;
  1594. begin
  1595.   with SysInfo.Startup, lvStartup, Items do begin
  1596.     BeginUpdate;
  1597.     Clear;
  1598.     case tcStartup.TabIndex of
  1599.       0: begin
  1600.         n:=User_Count-1;
  1601.         for i:=0 to n do
  1602.           with Add do begin
  1603.             Caption:=User_Runs[i];
  1604.             SubItems.Add(GetRunCommand(rtUser,i));
  1605.             ImageIndex:=iiProcess;
  1606.           end;
  1607.       end;
  1608.       1: begin
  1609.         n:=Common_Count-1;
  1610.         for i:=0 to n do
  1611.           with Add do begin
  1612.             Caption:=Common_Runs[i];
  1613.             SubItems.Add(GetRunCommand(rtCommon,i));
  1614.             ImageIndex:=iiProcess;
  1615.           end;
  1616.       end;
  1617.       2: begin
  1618.         n:=HKLM_Count-1;
  1619.         for i:=0 to n do
  1620.           with Add do begin
  1621.             Caption:=HKLM_Runs[i];
  1622.             SubItems.Add(GetRunCommand(rtHKLM,i));
  1623.             ImageIndex:=iiProcess;
  1624.           end;
  1625.       end;
  1626.       3: begin
  1627.         n:=HKCU_Count-1;
  1628.         for i:=0 to n do
  1629.           with Add do begin
  1630.             Caption:=HKCU_Runs[i];
  1631.             SubItems.Add(GetRunCommand(rtHKCU,i));
  1632.             ImageIndex:=iiProcess;
  1633.           end;
  1634.       end;
  1635.       4: begin
  1636.         n:=Once_Count-1;
  1637.         for i:=0 to n do
  1638.           with Add do begin
  1639.             Caption:=Once_Runs[i];
  1640.             SubItems.Add(GetRunCommand(rtOnce,i));
  1641.             ImageIndex:=iiProcess;
  1642.           end;
  1643.       end;
  1644.       5: begin
  1645.         n:=WININI_Count-1;
  1646.         for i:=0 to n do
  1647.           with Add do begin
  1648.             Caption:=WININI_Runs[i];
  1649.             SubItems.Add(GetRunCommand(rtWININI,i));
  1650.             ImageIndex:=iiProcess;
  1651.           end;
  1652.       end;
  1653.     end;
  1654.     EndUpdate;
  1655.   end;
  1656. end;
  1657.  
  1658. procedure TfrmMSI_Overview.GetStartupInfo;
  1659. begin
  1660.   tcStartupChange(tcStartup);
  1661. end;
  1662.  
  1663. procedure TfrmMSI_Overview.GetSWInfo;
  1664. var
  1665.   i: integer;
  1666. begin
  1667.   with SysInfo.Software, lvSW, Items do begin
  1668.     BeginUpdate;
  1669.     Clear;
  1670.     for i:=0 to Products.Count-1 do
  1671.       with Add do begin
  1672.         Caption:=Products[i];
  1673.         SubItems.Add(Uninstalls[i]);
  1674.         ImageIndex:=iiPackage;
  1675.       end;
  1676.     EndUpdate;
  1677.   end;
  1678. end;
  1679.  
  1680. procedure TfrmMSI_Overview.cmNTSpec(Sender: TObject);
  1681. var
  1682.   sl: TStringList;
  1683.   i: integer;
  1684. begin
  1685.   with TdlgMSI_Detail.Create(self) do begin
  1686.     Notebook.pageindex:=1;
  1687.     TitlePanel.Caption:='Installed Suites';
  1688.     clb.items.clear;
  1689.     sl:=TStringList.Create;
  1690.     SysInfo.OS.NTSpecific.Report_InstalledSuites(sl);
  1691.     for i:=0 to sl.count-1 do begin
  1692.       clb.items.Add(sl.Names[i]);
  1693.       clb.Checked[clb.items.count-1]:=Boolean(StrToInt(sl.Values[sl.Names[i]]));
  1694.     end;
  1695.     sl.Free;
  1696.     showmodal;
  1697.     free;
  1698.   end;
  1699. end;
  1700.  
  1701. procedure TfrmMSI_Overview.CPUUsageInterval(Sender: TObject;
  1702.   Value: Cardinal);
  1703. begin
  1704.   with SysInfo.Memory do begin
  1705.     GetInfo;
  1706.     ePT.text:=formatfloat('#,##',PhysicalTotal);
  1707.     ePF.text:=formatfloat('#,#0',PhysicalFree);
  1708.     eFT.text:=formatfloat('#,##',PageFileTotal);
  1709.     eFF.text:=formatfloat('#,#0',PageFileFree);
  1710.     eVT.text:=formatfloat('#,##',VirtualTotal);
  1711.     eVF.text:=formatfloat('#,#0',VirtualFree);
  1712.     gMemory.Progress:=MemoryLoad;
  1713.     gPhys.MaxValue:=PhysicalTotal;
  1714.     gPhys.Progress:=PhysicalFree;
  1715.     gPage.MaxValue:=PageFileTotal;
  1716.     gPage.Progress:=PageFileFree;
  1717.     gVirt.MaxValue:=VirtualTotal;
  1718.     gVirt.Progress:=VirtualFree;
  1719.     pbGDI.Position:=Resources.GDI;
  1720.     pbUser.Position:=Resources.User;
  1721.     pbSystem.Position:=Resources.System;
  1722.   end;
  1723.   lGDI.Caption:=Format('GDI - %d%% free',[pbGDI.Position]);
  1724.   lUser.Caption:=Format('User - %d%% free',[pbUser.Position]);
  1725.   lSystem.Caption:=Format('System - %d%% free',[pbSystem.Position]);
  1726.   CPUGauge.Progress:=Value;
  1727.   with SysInfo.Machine do begin
  1728.     GetInfo(0);
  1729.     eSysTime.text:=formatseconds(SystemUpTime,true,false,false);
  1730.     if NumLock then
  1731.       pNumLock.color:=clLime
  1732.     else
  1733.       pNumLock.color:=clSilver;
  1734.     if CapsLock then
  1735.       pCapsLock.color:=clLime
  1736.     else
  1737.       pCapsLock.color:=clSilver;
  1738.     if ScrollLock then
  1739.       pScrollLock.color:=clLime
  1740.     else
  1741.       pScrollLock.color:=clSilver;
  1742.   end;
  1743. end;
  1744.  
  1745. procedure TfrmMSI_Overview.cmWeb(Sender: TObject);
  1746. begin
  1747.   ShellExecute(handle,'open',
  1748.                'http://www.mitec.d2.cz',
  1749.                nil,nil,SW_NORMAL);
  1750. end;
  1751.  
  1752. procedure TfrmMSI_Overview.cbAdaptersChange(Sender: TObject);
  1753. var
  1754.   i: Integer;
  1755. begin
  1756.   with AdapterList.Items, SysInfo.Network.TCPIP.Adapter[cbAdapters.ItemIndex] do begin
  1757.     Clear;
  1758.     for i:=0 to IPAddress.Count-1 do
  1759.       with Add do begin
  1760.         Caption:=Format('Local[%d]',[i]);
  1761.         SubItems.Add(IPAddress[i]);
  1762.         SubItems.Add(IPAddressMask[i]);
  1763.       end;
  1764.     for i:=0 to Gateway_IPAddress.Count-1 do
  1765.       with Add do begin
  1766.         Caption:=Format('Gateway[%d]',[i]);
  1767.         SubItems.Add(Gateway_IPAddress[i]);
  1768.         SubItems.Add(Gateway_IPAddressMask[i]);
  1769.       end;
  1770.     for i:=0 to DHCP_IPAddress.Count-1 do
  1771.       with Add do begin
  1772.         Caption:=Format('DHCP Server[%d]',[i]);
  1773.         SubItems.Add(DHCP_IPAddress[i]);
  1774.         SubItems.Add(DHCP_IPAddressMask[i]);
  1775.       end;
  1776.     for i:=0 to PrimaryWINS_IPAddress.Count-1 do
  1777.       with Add do begin
  1778.         Caption:=Format('Primary WINS Server[%d]',[i]);
  1779.         SubItems.Add(PrimaryWINS_IPAddress[i]);
  1780.         SubItems.Add(PrimaryWINS_IPAddressMask[i]);
  1781.       end;
  1782.     for i:=0 to SecondaryWINS_IPAddress.Count-1 do
  1783.       with Add do begin
  1784.         Caption:=Format('Secondary WINS Server[%d]',[i]);
  1785.         SubItems.Add(SecondaryWINS_IPAddress[i]);
  1786.         SubItems.Add(SecondaryWINS_IPAddressMask[i]);
  1787.       end;
  1788.   end;
  1789. end;
  1790.  
  1791. end.
  1792.