[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

Stay on top

Hi,
i got two Forms. Every has the property fsStayOnTop.
Form1 is show Form2 and Form1.Hide.
Form2 is show Form1 and Form2.Hide.
So that only one of the two Forms is visible.
BUT: When Form2 is showing Form1, Form1 is no longer "fsStayOnTop"!
Can anyone help me?
bye
0
haehnen
Asked:
haehnen
1 Solution
 
philipleighsCommented:
Maybe just before you close a form, you should set it to fsNormal?
And just before you show it again, set it to fsStayOnTop?

Just an idea.

Cheers,
Phil.

0
 
haehnenAuthor Commented:
Hi,
that's not work!
bye
0
 
FelixinCommented:
This comes from the Delphi help:

fsStayOnTop      
This form remains on top of the desktop and of other forms in the project, except any others that also have FormStyle set to fsStayOnTop. If one fsStayOntop form launches another, neither form will consistently remain on top.

and

Note:      It is not advisable to change FormStyle at runtime.

I checked changing the FormStyle property at run time at it doesn't work, as you said.

Further investigation needed.

Sorry.

Felixin
0
 
haehnenAuthor Commented:
Hi,
here is the Code(in a OnMouseOverEvent):
Form4.Height := 71; //make Form4.visible:=False
Form4.Width := 239; //
Form3.Height := 0;  //make Form3.Visible:=True
Form3.Width := 0;

Form4 and Form3 have fsStayOnTop.
any Questions?
bye

0
 
zekoCommented:
When you want to display forms try
Form2.ShowModal; not Form2.Show;
Maybe this will help.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now