home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
infoscr.zip
/
ISCRDEM1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-10-16
|
3KB
|
103 lines
unit Iscrdem1;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Tinfoscr;
type
TForm1 = class(TForm)
InfoScreen1: TInfoScreen;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure InfoScreen1RegButtonClick(Sender: TObject);
private
public
end;
var
Form1: TForm1;
const
standardcomment='This is a sample application to show the use of the '+
'InfoScreen-Component. Please feel free to use the component '+
'in your own programs. If you want the source-code please send '+
'10 US$ to my address in Germany. For further information see '+
'the "InfoScr.wri"';
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
With InfoScreen1 do begin
comment:=standardcomment;
Delay:=10; (*delay=10 seconds*)
ShowRegButton:=True; (*Show "Register"-Button*)
Execute; (*It's so simple...*)
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
With InfoScreen1 do begin
comment:=standardcomment;
Delay:=0; (*disable delay*)
ShowRegButton:=False; (*do not show "Register"-Button*)
Execute; (*It's so simple...*)
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
With InfoScreen1 do begin
comment:=standardcomment;
Delay:=5; (*delay=5 seconds*)
ShowRegButton:=True; (*Show "Register"-Button*)
RegButtonCaption:='Yes.Ok.'; (*user-definded Caption*)
ContButtonCaption:='&Go on now'; (*user-defined Caption*)
Execute; (*It's so simple...*)
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
var gdires,sysres,userres:word;
begin
With InfoScreen1 do begin
Delay:=0; (*disable delay*)
ShowRegButton:=True; (*Show Register-Button*)
RegistrationInfo:='registered to: unregistered';
(*Show some system information, each row delmited with #13*)
sysres:=GetFreeSystemResources(0);
gdires:=GetFreeSystemResources(1);
userres:=GetFreeSystemResources(2);
Comment:='Free Resources: '+#13+
'System: '+inttostr(sysres)+' %'+#13+
'GDI : '+inttostr(gdires)+' %'+#13+
'User : '+inttostr(userres)+' %';
Execute; (*It's so simple...*)
end;
end;
procedure TForm1.InfoScreen1RegButtonClick(Sender: TObject);
begin
MessageDlg('Here you can place the code that '+
'will be executed after the Register-Button has been clicked', mtInformation,[MbOk],0);
end;
end.