From df9d19b38193989df005b88c2a4d4b1e6087849d Mon Sep 17 00:00:00 2001 From: vincents Date: Wed, 11 Jan 2006 12:37:27 +0000 Subject: [PATCH] implemented TApplicationProperties.ShowMainForm (issue #882) git-svn-id: trunk@8498 - --- lcl/forms.pp | 5 ++++- lcl/include/applicationproperties.inc | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lcl/forms.pp b/lcl/forms.pp index acc6dc8854..ea5cf501f4 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -1048,7 +1048,7 @@ type property OnUserInput: TOnUserInputEvent read FOnUserInput write FOnUserInput; property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; property ShowHint: Boolean read FShowHint write SetShowHint; - property ShowMainForm: Boolean read FShowMainForm write FShowMainForm; + property ShowMainForm: Boolean read FShowMainForm write FShowMainForm default true; property Title: String read GetTitle write SetTitle; end; @@ -1066,6 +1066,7 @@ type FHintShortCuts: Boolean; FHintShortPause: Integer; FShowHint: Boolean; + FShowMainForm: Boolean; FTitle: String; FOnException: TExceptionEvent; @@ -1075,6 +1076,7 @@ type FOnHint: TNotifyEvent; FOnShowHint: TShowHintEvent; FOnUserInput: TOnUserInputEvent; + procedure SetShowMainForm(const AValue: Boolean); protected Procedure SetCaptureExceptions(Const AValue : boolean); Procedure SetHelpFile(Const AValue : string); @@ -1107,6 +1109,7 @@ type property HintShortCuts: Boolean read FHintShortCuts write SetHintShortCuts; property HintShortPause: Integer read FHintShortPause write SetHintShortPause; property ShowHint: Boolean read FShowHint write SetShowHint; + property ShowMainForm: Boolean read FShowMainForm write SetShowMainForm default true; property Title: String read FTitle write SetTitle; property OnException: TExceptionEvent read FOnException write SetOnException; diff --git a/lcl/include/applicationproperties.inc b/lcl/include/applicationproperties.inc index dfa2c8ee48..882d131dc7 100644 --- a/lcl/include/applicationproperties.inc +++ b/lcl/include/applicationproperties.inc @@ -89,6 +89,14 @@ begin Application.ShowHint := AValue; end; +procedure TApplicationProperties.SetShowMainForm(const AValue: Boolean); +begin + FShowMainForm:=AValue; + + if not (csDesigning in ComponentState) then + Application.ShowMainForm := AValue; +end; + Procedure TApplicationProperties.SetTitle(Const AValue : String); begin FTitle := AValue; @@ -178,6 +186,7 @@ begin FShowHint := Application.ShowHint; FTitle := Application.Title; end; + FShowMainForm := true; FOnIdle := nil; FOnException := nil;