home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 April A / Pcwk4a98.iso / PROGRAM / DELPHI16 / Calmira / Src / SRC / SPLASH.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-02-15  |  2.9 KB  |  82 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 Splash;
  24.  
  25. { This is actually the program's main form.  The System 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.     Label1: TLabel;
  43.     VersionLabel: TLabel;
  44.     Label3: TLabel;
  45.     Bevel1: TBevel;
  46.     Image: TImage;
  47.     procedure FormCreate(Sender: TObject);
  48.   private
  49.     { Private declarations }
  50.   public
  51.     { Public declarations }
  52.     procedure TotalHide;
  53.   end;
  54.  
  55. var
  56.   SplashForm: TSplashForm;
  57.  
  58. implementation
  59.  
  60. {$R *.DFM}
  61.  
  62. uses Settings, WinProcs;
  63.  
  64. procedure TSplashForm.FormCreate(Sender: TObject);
  65. begin
  66.   if ShowSplash then
  67.     Image.Picture.Bitmap.Handle := LoadBitmap(HInstance, 'LOGO');
  68. end;
  69.  
  70. procedure TSplashForm.TotalHide;
  71. begin
  72.   { Placing the form off the desktop is usually a good bet, but
  73.     some utilities will drag it back on screen again so setting
  74.     the height to zero is needed too }
  75.  
  76.   Position := poDesigned;
  77.   Left := - Width - 4;
  78.   Height := 0;
  79. end;
  80.  
  81. end.
  82.