{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% osCommerce Product Manager for Windows (oscpmwin). Copyright ©2003,2004,2005 by Mario A. Valdez-Ramirez. You can contact Mario A. Valdez-Ramirez by email at mario@mariovaldez.org or paper mail at Olmos 809, San Nicolas, NL. 66495, Mexico. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} unit splash; interface USES Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ExtCtrls, StdCtrls; TYPE Topm_Form_splash = class(TForm) opm_Panel_Splash: TPanel; opm_Image_splash: TImage; opm_ProgressBar_Splash: TProgressBar; opm_Label_SplashVersion: TLabel; procedure opm_Image_splashClick(Sender: TObject); procedure FormDeactivate(Sender: TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormShow(Sender: TObject); private { Private declarations } public PROCEDURE opmPR_ReshowSplash; end; var opm_Form_splash: Topm_Form_splash; opm_SplayDelay : DOUBLE; IMPLEMENTATION USES main, oscpmdata, dataman; {$R *.dfm} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_splash.opm_Image_splashClick(Sender: TObject); begin opm_Form_splash.Deactivate; end; {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_splash.FormDeactivate(Sender: TObject); VAR SplashTime : DOUBLE; begin IF (opm_SplayDelay > 200) THEN BEGIN SplashTime := GetTickCount; REPEAT Application.ProcessMessages; UNTIL ((GetTickCount - SplashTime) > opm_SplayDelay); END; opm_Form_splash.Close; end; {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} procedure Topm_Form_splash.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin opm_Form_splash.Close; end; {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%} PROCEDURE Topm_Form_splash.opmPR_ReshowSplash; BEGIN opm_ProgressBar_Splash.Visible := FALSE; opm_SplayDelay := 0; opm_Form_splash.Show; END; procedure Topm_Form_splash.FormShow(Sender: TObject); begin opm_Label_SplashVersion.Caption := opmC_Version + '.' + opmG_ExeBuildVersion; end; INITIALIZATION opm_SplayDelay := 0; end.