home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / WIN / Programa / PXREST.ZIP / PRIV.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-04-29  |  1.2 KB  |  57 lines

  1. {$A+,B-,C-,D+,E-,F-,G+,H+,I+,J+,K-,L+,M-,N+,O+,P+,Q+,R+,S+,T-,U-,V+,W-,X+,Y-,Z1}
  2. {$MINSTACKSIZE $00004000}
  3. {$MAXSTACKSIZE $00100000}
  4. {$IMAGEBASE $00400000}
  5. {$APPTYPE GUI}
  6.  
  7. unit priv;
  8.  
  9. interface
  10.  
  11. uses
  12.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  13.   StdCtrls, Buttons, BDE, DB;
  14.  
  15. type
  16.   TPrivateDirForm = class(TForm)
  17.     Label1: TLabel;
  18.     Label2: TLabel;
  19.     Label3: TLabel;
  20.     PrivDirEd: TEdit;
  21.     SpeedButton1: TSpeedButton;
  22.     OpenDialog1: TOpenDialog;
  23.     OKBtn: TButton;
  24.     CancelBtn: TButton;
  25.     procedure SpeedButton1Click(Sender: TObject);
  26.     procedure FormShow(Sender: TObject);
  27.   private
  28.     { Private declarations }
  29.   public
  30.     { Public declarations }
  31.   end;
  32.  
  33. var
  34.   PrivateDirForm: TPrivateDirForm;
  35.  
  36. implementation
  37.  
  38. {$R *.DFM}
  39.  
  40. procedure TPrivateDirForm.SpeedButton1Click(Sender: TObject);
  41. begin
  42.   if OpenDialog1.Execute then
  43.     PrivDirEd.Text := LowerCase(ExtractFilePath(OpenDialog1.FileName));
  44. end;
  45.  
  46. procedure TPrivateDirForm.FormShow(Sender: TObject);
  47. var
  48.   SessionInfo: SesInfo;
  49.  
  50. begin
  51.   Check(DbiGetSesInfo(SessionInfo));
  52.   Label2.Caption := SessionInfo.szPrivDir;
  53.   PrivDirEd.Text := SessionInfo.szPrivDir;
  54. end;
  55.  
  56. end.
  57.