Board index » delphi » Child window styles: Simulation of fsStayOnTop?

Child window styles: Simulation of fsStayOnTop?


2003-09-10 10:00:33 PM
delphi162
Hallo,
Env.: Delphi 6 Ent. UP2
In my application I have a MainForm, which is at runtime nearly always in
maximed status. The user can open several child forms (like MDI, but it
isn't a MDI). Now my problem: The FormStyle of the child form is fsNormal
(and it should stay fsNormal), I'd simulate such a behaviour when
FormStyle was set to fsStayOnTop. When I try it with ChildForm.FormStyle =
fsStayOnTop it get some strange behaviour: I open a child window and it's
over the main form, I open a second child window and it is over the main
form, but under the first child window.
How can I simulate such a behaviour with fsStayOnTop? What kind of window
styles have I to use (override CreateParams)?
I want that all opened child windows are over the main form (they are not
hidden by the main form) and the focused child window is over all other
child windows.
Kind regards
Stephan
 
 

Re:Child window styles: Simulation of fsStayOnTop?

In article <3f5f2e7b$XXXX@XXXXX.COM>, Stephan Schneider writes:
Quote
In my application I have a MainForm, which is at runtime nearly always in
maximed status. The user can open several child forms (like MDI, but it
isn't a MDI). Now my problem: The FormStyle of the child form is fsNormal
(and it should stay fsNormal), I'd simulate such a behaviour when
FormStyle was set to fsStayOnTop. When I try it with ChildForm.FormStyle =
fsStayOnTop it get some strange behaviour: I open a child window and it's
over the main form, I open a second child window and it is over the main
form, but under the first child window.

How can I simulate such a behaviour with fsStayOnTop? What kind of window
styles have I to use (override CreateParams)?
Yep, override CreateParams in the child windows and set params.wndParent to
the handle of the main form.
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

Re:Child window styles: Simulation of fsStayOnTop?

Hello,
When I override CreateParams and set Params.WndParent := MainForm.Handle I
can create the child forms as well as I want, but when I click on the main
form itself all openend child forms are going to background. I want to see
all opened child forms in the foreground of the main form, also when the
main form has the focus.
Regards
Stephan
"Peter Below (TeamB)" <XXXX@XXXXX.COM>schrieb im Newsbeitrag
Quote
In article <3f5f2e7b$XXXX@XXXXX.COM>, Stephan Schneider writes:
>In my application I have a MainForm, which is at runtime nearly always
in
>maximed status. The user can open several child forms (like MDI, but it
>isn't a MDI). Now my problem: The FormStyle of the child form is
fsNormal
>(and it should stay fsNormal), I'd simulate such a behaviour when
>FormStyle was set to fsStayOnTop. When I try it with ChildForm.FormStyle
=
>fsStayOnTop it get some strange behaviour: I open a child window and
it's
>over the main form, I open a second child window and it is over the main
>form, but under the first child window.
>
>How can I simulate such a behaviour with fsStayOnTop? What kind of
window
>styles have I to use (override CreateParams)?

Yep, override CreateParams in the child windows and set params.wndParent
to
the handle of the main form.


--
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be


 

Re:Child window styles: Simulation of fsStayOnTop?

In article <3f5f6cfc$XXXX@XXXXX.COM>, Stephan Schneider writes:
Quote
When I override CreateParams and set Params.WndParent := MainForm.Handle I
can create the child forms as well as I want, but when I click on the main
form itself all openend child forms are going to background.
That is not correct. Show your CreateParams method (and you *do* have an
"override" on the declaration, i hope?).
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be