abstract:
(
var
Params: TCreateParams
)
; override;
procedure
TFormA.
CreateParams
(
var
Params: TCreateParams
)
;
begin
inherited
;
Params.
ExStyle
:= Params.
ExStyle
or
WS_EX_APPWINDOW;
Params.
WndParent
:= GetDesktopWindow;
end
;
I don't know whether this code has anything todo with this problem, but even then i am posting it.
Another issue (i guess related to the same problem), the window that is being created by the application gain focus automatically (if it is not minimized) on any event on other form (specially if there are some other dialog open). This window also has a number of cases to handle WINDOWS_MESSAGE but no case is XPILICTLY setting the focus.
I have made an application, on startup there are two forms (formA, formB) that are being load. so in task bar i can see 3 forms, (application, formA, formB). There is one form that is being created at application startup before the application main form is created, and if this form is open i can see 1 extra form in taskbar. else not i.e
Delphi Code:
[url=#top]
[/url]Original
- Delphi Code
DlgFormA := TFormA.Create(nil);
{..ON SOME CONDITION TRUE}
application.CreateForm(TfrmMainFrame, frmMainFrame);- DlgFormA := TFormA.
- Create
- (
- nil
- )
- ;
- {..ON SOME CONDITION TRUE}
- application.
- CreateForm
- (
- TfrmMainFrame, frmMainFrame
- )
- ;
Copy Code Now, whenever i have FormA open, i can see Active form + 1 window in task bar. i.e if there is on FormA active then i can see 2 windows in task bar. if there are 2 windows active (one formA and other some other form) then i can see three windows in task bar.
I don't want to see that one extra window in task bar. how can i tackle it?
One more thing. I have used this code which have solved the minimizing issue to the taskbar. before this code if i minimized the form it did not minimize to taskbar, rather it minimized above taskbar in the lower left corner.
Delphi Code:
[url=#top]
[/url]Original
- Delphi Code
procedure CreateParams(var Params: TCreateParams); override;
procedure TFormA.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
Params.WndParent := GetDesktopWindow;
end;- procedure
- CreateParams
- (
- var
- Params: TCreateParams
- )
- ; override;
- procedure
- TFormA.
- CreateParams
- (
- var
- Params: TCreateParams
- )
- ;
- begin
- inherited
- ;
- Params.
- ExStyle
- := Params.
- ExStyle
- or
- WS_EX_APPWINDOW;
- Params.
- WndParent
- := GetDesktopWindow;
- end
- ;
Copy Code I don't know whether this code has anything todo with this problem, but even then i am posting it.
Another issue (i guess related to the same problem), the window that is being created by the application gain focus automatically (if it is not minimized) on any event on other form (specially if there are some other dialog open). This window also has a number of cases to handle WINDOWS_MESSAGE but no case is XPILICTLY setting the focus. |