home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TTT405.ZIP / TTTDEMOS.EXE / DIRDEM.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-07-17  |  898 b   |  35 lines

  1. Program Example_of_The_Directory_Lister;
  2. {TTT 4.05}
  3. Uses CRT, FastTTT, DOS, KeyTTT, WinTTT, DirTTT;
  4.  
  5. Var
  6.  StartPath, Path, Mask, Chosen_File : string;
  7.  Ch : char;
  8.  
  9. begin
  10.     ClrScr;
  11.     GetDir(0,StartPath);
  12.     Path := StartPath;
  13.     Mask := '*.*';
  14.     With D do
  15.     begin
  16.         Cols := 5;
  17.         Rows := 8;
  18.         AllowEsc := True;
  19.         BoxType := 4;
  20.     end;
  21.    {Thats all you have to do! Now call the directory function. You may want
  22.     to save the screen first in a real application}
  23.    Chosen_File := Display_Directory(Path,Mask);
  24.  
  25.    GotoXy(1,22);
  26.    If Chosen_File = #027 then
  27.       Write('You escaped')
  28.    else
  29.       Write('You selected file ',Chosen_File);
  30.    {$I-}
  31.    ChDir(StartPath);
  32.    WriteAT(1,24,white,black,'Run DemoTTT.exe for the main demo program');
  33.    WriteAT(1,25,white,black,'Technojocks Turbo Toolkit v4.0');
  34.    Ch := readkey;
  35. end.