home *** CD-ROM | disk | FTP | other *** search
/ PC Open 19 / pcopen19.iso / Zipped / CALMIR21.ZIP / SOURCE.ZIP / SRC / SPLASH.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-02-20  |  2.8 KB  |  81 lines

  1. {**************************************************************************}
  2. {                                                                          }
  3. {    Calmira shell for Microsoft« Windows(TM) 3.1                          }
  4. {    Source Release 2.1                                                    }
  5. {    Copyright (C) 1997-1998 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 Splash;
  24.  
  25. { This is actually the program's main form.  The Computer window can't
  26.   be used because we need to see it minimized while the rest of the
  27.   forms are on screen.
  28.  
  29.   Delphi insists on displaying the main form, so to allow the user
  30.   to avoid the splash screen, the project source calls TotalHide
  31.   to make sure that it cannot be seen }
  32.  
  33.  
  34. interface
  35.  
  36. uses
  37.   Classes, Controls, Forms, ExtCtrls, StdCtrls;
  38.  
  39. type
  40.   TSplashForm = class(TForm)
  41.     Panel: TPanel;
  42.     Image: TImage;
  43.     Label1: TLabel;
  44.     VersionLabel: TLabel;
  45.     Label3: TLabel;
  46.     procedure FormCreate(Sender: TObject);
  47.   private
  48.     { Private declarations }
  49.   public
  50.     { Public declarations }
  51.     procedure TotalHide;
  52.   end;
  53.  
  54. var
  55.   SplashForm: TSplashForm;
  56.  
  57. implementation
  58.  
  59. {$R *.DFM}
  60.  
  61. uses Settings, WinProcs;
  62.  
  63. procedure TSplashForm.TotalHide;
  64. begin
  65.   { Placing the form off the desktop is usually a good bet, but
  66.     some utilities will drag it back on screen again so setting
  67.     the height to zero is needed too }
  68.  
  69.   Position := poDesigned;
  70.   Left := - Width;
  71.   Height := 0;
  72.   Panel.Free;
  73. end;
  74.  
  75. procedure TSplashForm.FormCreate(Sender: TObject);
  76. begin
  77.   Image.Picture.Icon.Handle := LoadIcon(HInstance, 'MAINICON');
  78. end;
  79.  
  80. end.
  81.