Source code of file oscpmwin_v0.1.1.652/splash.pas from the
osCommerce Product Manager for Windows.
0000: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001: osCommerce Product Manager for Windows (oscpmwin).
0002: Copyright �2003,2004,2005 by Mario A. Valdez-Ramirez.
0003:
0004: You can contact Mario A. Valdez-Ramirez
0005: by email at mario@mariovaldez.org or paper mail at
0006: Olmos 809, San Nicolas, NL. 66495, Mexico.
0007:
0008: This program is free software; you can redistribute it and/or modify
0009: it under the terms of the GNU General Public License as published by
0010: the Free Software Foundation; either version 2 of the License, or (at
0011: your option) any later version.
0012:
0013: This program is distributed in the hope that it will be useful, but
0014: WITHOUT ANY WARRANTY; without even the implied warranty of
0015: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0016: General Public License for more details.
0017:
0018: You should have received a copy of the GNU General Public License
0019: along with this program; if not, write to the Free Software
0020: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0021: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0022: unit splash;
0023:
0024: interface
0025:
0026: USES
0027: Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
0028: Dialogs, ComCtrls, ExtCtrls;
0029:
0030: TYPE
0031: Topm_Form_splash = class(TForm)
0032: opm_Panel_Splash: TPanel;
0033: opm_Image_splash: TImage;
0034: opm_ProgressBar_Splash: TProgressBar;
0035: procedure opm_Image_splashClick(Sender: TObject);
0036: procedure FormDeactivate(Sender: TObject);
0037: procedure FormKeyDown(Sender: TObject; var Key: Word;
0038: Shift: TShiftState);
0039: private
0040: { Private declarations }
0041: public
0042: PROCEDURE opmPR_ReshowSplash;
0043: end;
0044:
0045: var
0046: opm_Form_splash: Topm_Form_splash;
0047: opm_SplayDelay : REAL;
0048:
0049: IMPLEMENTATION
0050:
0051: USES main;
0052:
0053: {$R *.dfm}
0054:
0055:
0056: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0057: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0058: procedure Topm_Form_splash.opm_Image_splashClick(Sender: TObject);
0059: begin
0060: opm_Form_splash.Deactivate;
0061: end;
0062:
0063:
0064: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0065: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0066: procedure Topm_Form_splash.FormDeactivate(Sender: TObject);
0067: VAR
0068: SplashTime : REAL;
0069: begin
0070: IF (opm_SplayDelay > 200) THEN
0071: BEGIN
0072: SplashTime := GetTickCount;
0073: REPEAT
0074: Application.ProcessMessages;
0075: UNTIL ((GetTickCount - SplashTime) > opm_SplayDelay);
0076: END;
0077: opm_Form_splash.Close;
0078: end;
0079:
0080:
0081: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0082: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0083: procedure Topm_Form_splash.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
0084: begin
0085: opm_Form_splash.Close;
0086: end;
0087:
0088:
0089: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0090: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0091: PROCEDURE Topm_Form_splash.opmPR_ReshowSplash;
0092: BEGIN
0093: opm_ProgressBar_Splash.Visible := FALSE;
0094: opm_SplayDelay := 0;
0095: opm_Form_splash.Show;
0096: END;
0097:
0098:
0099: INITIALIZATION
0100: opm_SplayDelay := 0;
0101:
0102: end.