?
Solved

Stay on top

Posted on 1999-06-23
5
Medium Priority
?
293 Views
Last Modified: 2010-04-04
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
Comment
Question by:haehnen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:philipleighs
ID: 1384243
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
 

Author Comment

by:haehnen
ID: 1384244
Hi,
that's not work!
bye
0
 
LVL 2

Expert Comment

by:Felixin
ID: 1384245
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
 

Author Comment

by:haehnen
ID: 1384246
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
 

Accepted Solution

by:
zeko earned 20 total points
ID: 1384247
When you want to display forms try
Form2.ShowModal; not Form2.Show;
Maybe this will help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question