Class TSplashMessage (unit splashms)

Inherits from

TComponent

Constructors


constructor Create( AOwner : TComponent );

Call to allow Windows to process Windows Events

------------------------------------------------------------------------- } { Create Constructor -- Creates this Component.



Functions

destructor Destroy;

------------------------------------------------------------------------- } { Destroy Destructor -- Destroy's the Splash Message Component.

procedure Process;

Call to Stop the Splash Message Form

Process -- Allows Windows to Process Window Events


procedure Splash;

------------------------------------------------------------------------- } { Splash -- Creates and Display's the Splash Message screen } { -------------------------------------------------------------------------

procedure Stop;

Call to Display the Splash Message Form

Stop -- Stops displaying the Splash Message


function CreateSplashMessage(const Msg: string; DlgType: TSMsgDlgType; AButtons: TSMsgDlgButtons; aGauge : TSplashGauge ): TForm;

-------------------------------------------------------------------------- } { CreateSplashMessage - Is where the SplashMessage Form is created.

procedure EnableApplication;

EnableApplication -- Enables all Forms belonging to the application

procedure FormClose(Sender: TObject; var Action: TCloseAction);

FormClose Event -- The SplashMessage Custom OnFormClose Event

function GetAveCharSize(Canvas: TCanvas): TPoint;

-------------------------------------------------------------------------- } { GetAveCharSize - Gets the Average size of a Character Byte for the Splash } { Form's Canvas property.

function GetGauge: TSplashGauge;

SetGauge -- Sets the TGauge prpoperties

function GetTextRect( aCanvas : TCanvas; Msg : string ): TRect;

GetTextRect - Sets the Width of the Message.

function Max(I, J: Integer): Integer;

Max - Used to Set The ClientWidth property of the Splash Message Form during } { the initial create process.

procedure OnButtonClick( Sender : TObject );

------------------------------------------------------------------------- } { OnButtonClick Event -- Sets any buttons to the Custom OnformClose event } { Allows users to intrupt local processing before } { the Splash Message screen is closed.

procedure SetButtonEvent( F : TForm );

SetButtonEvent - Sets up any buttons to the Custom OnButtonClick Event of } { this component.

procedure SetDlgType( Value : TSMsgDlgType );


procedure SetFont( Value : TFont );

SetFont -- Sets the ScreenFont property

procedure SetGauge( Value : TSplashGauge );


procedure SetIcon( Value : TIcon );

SetIcon -- Sets the Icon property

procedure SetMessage( Value : string );

SetMessage - Allows the MessageText property to be changed at run-time

procedure SetModal( Value : Boolean );

---------------------------------------------------------------------------- } { ------------ Splash Message Functions and Procedures -----------------------

procedure SetPicture( Value : TPicture );


procedure SetWidth( Value : Integer );

SetWidth - Allows the Width property to be Set at run-time

Properties

property BorderIcons : TBorderIcons


property BorderStyle : TFormBorderStyle


property Buttons : TSMsgDlgButtons


property Caption : string


property DefaultFont : boolean


property DialogType : TSMsgDlgType


property Enabled : boolean


property FixedWidth : Integer


property Gauge : TSplashGauge

Published declarations

property Height : Integer


property HelpContext : THelpContext


property Hint : string


property Icon : TIcon


property MessageText : string


property Modal : boolean


property Picture : TPicture


property ScreenFont : TFont


property ShowHint : boolean


property ShowProgress : boolean


property Visible : boolean


property Canceled : Boolean

Public declarations } { This property does not appear on the Object inspector, but can be accssed } { Inside your application to check and see if a button was clicked.

Events

event OnCloseForm : TNotifyEvent

Custom CloseForm Event

Variables

ButtonWasClicked : boolean;


FBorderIcons : TBorderIcons;


FBorderStyle : TFormBorderStyle;


FButtons : TSMsgDlgButtons;


FCanceled : boolean;


FCaption : String;


FCloseForm : TNotifyEvent;


FDefaultFont : boolean;


FDlgType : TSMsgDlgType;


FEnabled : boolean;


FFont : TFont;


FGauge : TSplashGauge;


FGaugeColor : TColor;


FHeight : Integer;


FHelpContext : THelpContext;


FHint : string;


FIcon : TIcon;


FMessage : String;


FModal : boolean;


FPicture : TPicture;


FShowHint : boolean;


FShowProgress : boolean;


FTop : Integer;


FVisible : boolean;


FWidth : Integer;


MsgLabel : TLabel;


NewIcon : boolean;


OldLeft : Integer;


OldTop : Integer;


ReDraw : boolean;


SplashForm : TForm;

Private declarations

SysClose : boolean;



Constructors


constructor Create( AOwner : TComponent );

Call to allow Windows to process Windows Events

------------------------------------------------------------------------- } { Create Constructor -- Creates this Component. } { -------------------------------------------------------------------------


Functions


destructor Destroy;

------------------------------------------------------------------------- } { Destroy Destructor -- Destroy's the Splash Message Component. } { -------------------------------------------------------------------------


procedure Process;

Call to Stop the Splash Message Form

Process -- Allows Windows to Process Window Events


procedure Splash;

------------------------------------------------------------------------- } { Splash -- Creates and Display's the Splash Message screen } { -------------------------------------------------------------------------


procedure Stop;

Call to Display the Splash Message Form

Stop -- Stops displaying the Splash Message


function CreateSplashMessage(const Msg: string; DlgType: TSMsgDlgType; AButtons: TSMsgDlgButtons; aGauge : TSplashGauge ): TForm;

-------------------------------------------------------------------------- } { CreateSplashMessage - Is where the SplashMessage Form is created. This is } { called when the form is initially created, and also } { when the form's message has been changed ( unless the } { fixed width is set to True ). } { the bulk of this code is taken from the 32-bit version } { of dialog.pas and has been modified for this component } { --------------------------------------------------------------------------


procedure EnableApplication;

EnableApplication -- Enables all Forms belonging to the application


procedure FormClose(Sender: TObject; var Action: TCloseAction);

FormClose Event -- The SplashMessage Custom OnFormClose Event


function GetAveCharSize(Canvas: TCanvas): TPoint;

-------------------------------------------------------------------------- } { GetAveCharSize - Gets the Average size of a Character Byte for the Splash } { Form's Canvas property. This code is taken from the 32-bit } { dialog.pas file. The API function GetTextExtentPoint is } { used to calculate the ave height and width of the currently } { selected font. } { --------------------------------------------------------------------------


function GetGauge: TSplashGauge;

SetGauge -- Sets the TGauge prpoperties


function GetTextRect( aCanvas : TCanvas; Msg : string ): TRect;

GetTextRect - Sets the Width of the Message. This is called when the Splash } { message is created, and also when the message is changed.


function Max(I, J: Integer): Integer;

Max - Used to Set The ClientWidth property of the Splash Message Form during } { the initial create process.


procedure OnButtonClick( Sender : TObject );

------------------------------------------------------------------------- } { OnButtonClick Event -- Sets any buttons to the Custom OnformClose event } { Allows users to intrupt local processing before } { the Splash Message screen is closed. } { -------------------------------------------------------------------------


procedure SetButtonEvent( F : TForm );

SetButtonEvent - Sets up any buttons to the Custom OnButtonClick Event of } { this component.


procedure SetDlgType( Value : TSMsgDlgType );


procedure SetFont( Value : TFont );

SetFont -- Sets the ScreenFont property


procedure SetGauge( Value : TSplashGauge );


procedure SetIcon( Value : TIcon );

SetIcon -- Sets the Icon property


procedure SetMessage( Value : string );

SetMessage - Allows the MessageText property to be changed at run-time


procedure SetModal( Value : Boolean );

---------------------------------------------------------------------------- } { ------------ Splash Message Functions and Procedures -----------------------


procedure SetPicture( Value : TPicture );


procedure SetWidth( Value : Integer );

SetWidth - Allows the Width property to be Set at run-time


Properties


property BorderIcons : TBorderIcons


property BorderStyle : TFormBorderStyle


property Buttons : TSMsgDlgButtons


property Caption : string


property DefaultFont : boolean


property DialogType : TSMsgDlgType


property Enabled : boolean


property FixedWidth : Integer


property Gauge : TSplashGauge

Published declarations


property Height : Integer


property HelpContext : THelpContext


property Hint : string


property Icon : TIcon


property MessageText : string


property Modal : boolean


property Picture : TPicture


property ScreenFont : TFont


property ShowHint : boolean


property ShowProgress : boolean


property Visible : boolean


property Canceled : Boolean

Public declarations } { This property does not appear on the Object inspector, but can be accssed } { Inside your application to check and see if a button was clicked. Any } { button clicked, except the help button will close the Spashmessage form } { Therefore, the user can check to see if Canceled is True, and end stop } { any processing desired inside the application.


Events


event OnCloseForm : TNotifyEvent

Custom CloseForm Event


Variables


ButtonWasClicked : boolean;


FBorderIcons : TBorderIcons;


FBorderStyle : TFormBorderStyle;


FButtons : TSMsgDlgButtons;


FCanceled : boolean;


FCaption : String;


FCloseForm : TNotifyEvent;


FDefaultFont : boolean;


FDlgType : TSMsgDlgType;


FEnabled : boolean;


FFont : TFont;


FGauge : TSplashGauge;


FGaugeColor : TColor;


FHeight : Integer;


FHelpContext : THelpContext;


FHint : string;


FIcon : TIcon;


FMessage : String;


FModal : boolean;


FPicture : TPicture;


FShowHint : boolean;


FShowProgress : boolean;


FTop : Integer;


FVisible : boolean;


FWidth : Integer;


MsgLabel : TLabel;


NewIcon : boolean;


OldLeft : Integer;


OldTop : Integer;


ReDraw : boolean;


SplashForm : TForm;

Private declarations


SysClose : boolean;