home *** CD-ROM | disk | FTP | other *** search
- var
- Trash : char;
- attribyte,
- OldAttribute : byte;
- Xcursor : integer ;
- Ycursor : integer ;
-
- begin
-
- filename := '*.*' ;
- attribyte := 255 ;
- OldAttribute := attribyte;
-
- Xcursor := 2 ;
- Ycursor := 1 ;
- GotoXy(Xcursor,Ycursor) ;
-
- Find_First(attribyte,filename,Retcode);
- If Retcode = 0 then
- begin
- write(Filename);
- Ycursor := Ycursor +1 ;
- end;
- {Now we repeat Find_Next until an error occurs }
-
- repeat
- Find_Next(attribyte,filename,Retcode);
- if Retcode = 0 then
- begin
- GotoXY(Xcursor,Ycursor);
- Write(filename) ;
- Ycursor := Ycursor + 1 ;
-
- if WhereY >= 14 then
- begin
- Xcursor := Xcursor + 16 ;
- Ycursor := 1 ;
- end;
-
- if (Xcursor >= 50) and (Ycursor = 13 ) then
- begin
- Ycursor := Ycursor + 1;
- GotoXY(Xcursor,Ycursor);
-
- Get_Abs_Cursor(x,y); { Box up More msg..}
- MkWin(x,y,x+10,y+1,Cyan,black,0); Gotoxy(1,1);
- Write (' More...');
-
- While (Not Keypressed);
- Read(Kbd,trash) ;
- RmWin; { Remove "More" window }
-
- clrscr ;
- Xcursor := 2 ;
- Ycursor := 1 ;
- end;
- end;
- until Retcode <> 0;
- { Make a little Window and hold for }
- { user to give us a goose..or whatever}
- GotoXY(Xcursor,Ycursor);
- Get_Abs_Cursor(x,y); { Get Absolute Cursor Position }
- MkWin(x,y,x+16,y+1,Cyan,Black,0); { Put Window at Cursor }
- GotoXY(1,1);
- Write('Press a key ...');
-
- While (Not Keypressed); { Pause until Key pressed }
- While Keypressed do { Get Ctrl-Home maybe }
- Read(Kbd,KeyChr); { Read the users Key }
- RmWin ; { Remove the Window }
- If KeyChr = Quit_Key then { If Terminate Key then }
- Stay_Xit ; { remove ourself from Memory }
- end;
-
- {----------------------------------------------------------------------}
- { D E M O }
- {----------------------------------------------------------------------}
- Procedure Demo ; { Give Demonstration of Code }
-
- begin
- KeyChr := #0; { Clear any residual krap }
- MkWin(5,5,75,20,Bright+Cyan,Black,3); { Make a Biiiiiiig window}
- Clrscr; { Clear screen out }
- Get_file; { Show directory entries }
- RmWin; { Remove the big window }
- end; { Demo }
-