source: cprs/branches/GUI-config/frmSplash.pas@ 1727

Last change on this file since 1727 was 610, checked in by Kevin Toppenberg, 15 years ago

Allow user-definable splash.jpg image

File size: 2.0 KB
Line 
1unit frmSplash;
2 (*
3 WorldVistA Configuration Utility
4 (c) 8/2008 Kevin Toppenberg
5 Programmed by Kevin Toppenberg, Eddie Hagood
6
7 Family Physicians of Greeneville, PC
8 1410 Tusculum Blvd, Suite 2600
9 Greeneville, TN 37745
10 kdtop@yahoo.com
11
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Lesser General Public
14 License as published by the Free Software Foundation; either
15 version 2.1 of the License, or (at your option) any later version.
16
17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public
23 License along with this library; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 *)
26
27interface
28
29uses
30 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
31 Dialogs, StdCtrls, jpeg, ExtCtrls;
32
33type
34 TSplashForm = class(TForm)
35 Image1: TImage;
36 procedure Image1Click(Sender: TObject);
37 procedure FormCreate(Sender: TObject);
38 private
39 { Private declarations }
40 public
41 { Public declarations }
42 end;
43
44var
45 SplashForm: TSplashForm;
46
47implementation
48
49{$R *.dfm}
50
51procedure TSplashForm.Image1Click(Sender: TObject);
52begin
53 hide;
54end;
55
56procedure TSplashForm.FormCreate(Sender: TObject);
57var FileName : string;
58begin
59 FileName := ExtractFilePath(ParamStr(0))+ 'splash.jpg';
60 if FileExists(FileName) then begin
61 Image1.Picture.LoadFromFile(FileName);
62 end;
63 Self.Width := Image1.Picture.Width;
64 Self.Height := Image1.Picture.Height;
65 Self.Left:=(Screen.Width - Self.Width) div 2;
66 Self.Top := (Screen.Height - Self.Height) div 2;
67end;
68
69end.
70
Note: See TracBrowser for help on using the repository browser.