home *** CD-ROM | disk | FTP | other *** search
/ Quake++ for Quake / Quake++.iso / quake / unit2.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-18  |  702 b   |  43 lines

  1. unit Unit2;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls;
  8.  
  9. type
  10.   Tr = class(TForm)
  11.     Edit1: TEdit;
  12.     Label1: TLabel;
  13.     Button1: TButton;
  14.     Button2: TButton;
  15.     procedure Button1Click(Sender: TObject);
  16.     procedure Button2Click(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   r: Tr;
  25.   cmd: array[0..255] of char;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure Tr.Button1Click(Sender: TObject);
  32. begin
  33. strpcopy(cmd,edit1.text);
  34. winexec(cmd,sw_shownormal);
  35. end;
  36.  
  37. procedure Tr.Button2Click(Sender: TObject);
  38. begin
  39. close;
  40. end;
  41.  
  42. end.
  43.