home *** CD-ROM | disk | FTP | other *** search
- unit Sysinfo;
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
- StdCtrls, Lmdsysin, ExtCtrls, sysutils, listdlg;
-
- type
- TSysinfodlg = class(TForm)
- Panel1: TPanel;
- Label7: TLabel;
- Label8: TLabel;
- Label9: TLabel;
- Label10: TLabel;
- Label11: TLabel;
- Label12: TLabel;
- Panel2: TPanel;
- SI: TLMDSysInfo;
- Label1: TLabel;
- Label2: TLabel;
- Button1: TButton;
- Button2: TButton;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- Button3: TButton;
- Button4: TButton;
- Button5: TButton;
- procedure FormPaint(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- procedure Button4Click(Sender: TObject);
- procedure Button5Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- const
- envstr='Environment';
- fontstr='Available Fonts';
- printstr='Available Printers';
- sysstr='System Info - ';
- var
- Sysinfodlg: TSysinfodlg;
-
- implementation
-
- {$R *.DFM}
-
- procedure TSysinfodlg.FormPaint(Sender: TObject);
- begin
- Label11.Caption := SI.FreeGDIRes;
- Label2.Caption := SI.FreeSysRes;
- Label10.Caption := SI.FreeUsrRes;
- Label12.Caption := inttostr(SI.MemFree) +' bytes';
- Label5.Caption := SI.VersionWin;
- Label6.Caption := SI.VersionDos;
- end;
-
- procedure TSysinfodlg.Button1Click(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TSysinfodlg.Button3Click(Sender: TObject);
- begin
- with Listdlgform do begin
- Caption := sysstr +fontstr;
- ListCaption.Caption := fontstr;
- List.Items := SI.AllFonts;
- ShowModal;
- end;
- end;
-
- procedure TSysinfodlg.Button4Click(Sender: TObject);
- begin
- with Listdlgform do begin
- Caption := sysstr +printstr;
- ListCaption.Caption := printstr;
- List.Items := SI.AllPrinters;
- ShowModal;
- end;
- end;
-
- procedure TSysinfodlg.Button5Click(Sender: TObject);
- begin
- with Listdlgform do begin
- Caption := sysstr+envstr;
- ListCaption.Caption := envstr;
- List.Items := SI.Environment;
- ShowModal;
- end;
-
- end;
-
- end.
-