home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 April A / Pcwk4a98.iso / PROGRAM / DELPHI16 / Calmira / Src / SRC / BUSY.PAS < prev    next >
Pascal/Delphi Source File  |  1997-02-15  |  2KB  |  72 lines

  1. {**************************************************************************}
  2. {                                                                          }
  3. {    Calmira shell for Microsoft« Windows(TM) 3.1                          }
  4. {    Source Release 1.0                                                    }
  5. {    Copyright (C) 1997  Li-Hsin Huang                                     }
  6. {                                                                          }
  7. {    This program is free software; you can redistribute it and/or modify  }
  8. {    it under the terms of the GNU General Public License as published by  }
  9. {    the Free Software Foundation; either version 2 of the License, or     }
  10. {    (at your option) any later version.                                   }
  11. {                                                                          }
  12. {    This program is distributed in the hope that it will be useful,       }
  13. {    but WITHOUT ANY WARRANTY; without even the implied warranty of        }
  14. {    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         }
  15. {    GNU General Public License for more details.                          }
  16. {                                                                          }
  17. {    You should have received a copy of the GNU General Public License     }
  18. {    along with this program; if not, write to the Free Software           }
  19. {    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.             }
  20. {                                                                          }
  21. {**************************************************************************}
  22.  
  23. unit Busy;
  24.  
  25. interface
  26.  
  27. uses Classes, Controls, Forms, StdCtrls;
  28.  
  29. type
  30.   TBusyBox = class(TForm)
  31.     Label1: TLabel;
  32.     procedure FormShow(Sender: TObject);
  33.     procedure FormHide(Sender: TObject);
  34.   private
  35.     { Private declarations }
  36.   public
  37.     { Public declarations }
  38.     procedure ShowMessage(const s: string);
  39.   end;
  40.  
  41. var
  42.   BusyBox: TBusyBox;
  43.  
  44. implementation
  45.  
  46. {$R *.DFM}
  47.  
  48. uses Desk, Replace;
  49.  
  50. procedure TBusyBox.ShowMessage(const s: string);
  51. begin
  52.   Label1.Caption := s;
  53.   Show;
  54.   Update;
  55. end;
  56.  
  57.  
  58. procedure TBusyBox.FormShow(Sender: TObject);
  59. begin
  60.   Desktop.EnableForms(False);
  61. end;
  62.  
  63.  
  64. procedure TBusyBox.FormHide(Sender: TObject);
  65. begin
  66.   Desktop.EnableForms(True);
  67.   ReplaceBox.Free;
  68.   ReplaceBox := nil;
  69. end;
  70.  
  71. end.
  72.