home *** CD-ROM | disk | FTP | other *** search
/ Chip: Shareware for Win 95 / Chip-Shareware-Win95.bin / ostatni / delphi / delphi1 / lmdtoolb.exe / demos / fileman / sysinfo.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1995-09-06  |  2.1 KB  |  100 lines

  1. unit Sysinfo;
  2.  
  3. interface
  4.  
  5. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  6.   StdCtrls, Lmdsysin, ExtCtrls, sysutils, listdlg;
  7.  
  8. type
  9.   TSysinfodlg = class(TForm)
  10.     Panel1: TPanel;
  11.     Label7: TLabel;
  12.     Label8: TLabel;
  13.     Label9: TLabel;
  14.     Label10: TLabel;
  15.     Label11: TLabel;
  16.     Label12: TLabel;
  17.     Panel2: TPanel;
  18.     SI: TLMDSysInfo;
  19.     Label1: TLabel;
  20.     Label2: TLabel;
  21.     Button1: TButton;
  22.     Button2: TButton;
  23.     Label3: TLabel;
  24.     Label4: TLabel;
  25.     Label5: TLabel;
  26.     Label6: TLabel;
  27.     Button3: TButton;
  28.     Button4: TButton;
  29.     Button5: TButton;
  30.     procedure FormPaint(Sender: TObject);
  31.     procedure Button1Click(Sender: TObject);
  32.     procedure Button3Click(Sender: TObject);
  33.     procedure Button4Click(Sender: TObject);
  34.     procedure Button5Click(Sender: TObject);
  35.   private
  36.     { Private declarations }
  37.   public
  38.     { Public declarations }
  39.   end;
  40.  
  41. const
  42.   envstr='Environment';
  43.   fontstr='Available Fonts';
  44.   printstr='Available Printers';
  45.   sysstr='System Info - ';
  46. var
  47.   Sysinfodlg: TSysinfodlg;
  48.  
  49. implementation
  50.  
  51. {$R *.DFM}
  52.  
  53. procedure TSysinfodlg.FormPaint(Sender: TObject);
  54. begin
  55.   Label11.Caption := SI.FreeGDIRes;
  56.   Label2.Caption := SI.FreeSysRes;
  57.   Label10.Caption := SI.FreeUsrRes;
  58.   Label12.Caption := inttostr(SI.MemFree) +' bytes';
  59.   Label5.Caption := SI.VersionWin;
  60.   Label6.Caption := SI.VersionDos;
  61. end;
  62.  
  63. procedure TSysinfodlg.Button1Click(Sender: TObject);
  64. begin
  65.   Close;
  66. end;
  67.  
  68. procedure TSysinfodlg.Button3Click(Sender: TObject);
  69. begin
  70.   with Listdlgform do begin
  71.     Caption := sysstr +fontstr;
  72.     ListCaption.Caption := fontstr;
  73.     List.Items := SI.AllFonts;
  74.     ShowModal;
  75.   end;
  76. end;
  77.  
  78. procedure TSysinfodlg.Button4Click(Sender: TObject);
  79. begin
  80.   with Listdlgform do begin
  81.     Caption := sysstr +printstr;
  82.     ListCaption.Caption := printstr;
  83.     List.Items := SI.AllPrinters;
  84.     ShowModal;
  85.   end;
  86. end;
  87.  
  88. procedure TSysinfodlg.Button5Click(Sender: TObject);
  89. begin
  90.   with Listdlgform do begin
  91.     Caption := sysstr+envstr;
  92.     ListCaption.Caption := envstr;
  93.     List.Items := SI.Environment;
  94.     ShowModal;
  95.   end;
  96.  
  97. end;
  98.  
  99. end.
  100.