home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 January
/
Chip_1999-01_cd.bin
/
zkuste
/
delphi
/
D1
/
COOLCALC.ZIP
/
RUNCACLF.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-09-18
|
1KB
|
52 lines
unit Runcaclf;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, CCalcDlg;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
dlgCalc : TdlgCalculator;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
{ THE LINE OF CODE BELOW WILL SEARCH THE FOLLOWING DIRECTORIES IN LISTED ORDER
1 The current directory
2 The Windows directory
3 The Windows system directory
4 The directory containing the executable file for the current task
5 The directories listed in the PATH environment variable.
6 The directories mapped in a network. }
WinExec('CoolCalc.exe', SW_SHOW);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
dlgCalc := TdlgCalculator.Create(Self);
dlgCalc.ShowModal;
Edit1.Text := dlgCalc.lblResult.Caption;
dlgCalc.Free;
end;
end.