Solved

Stay On Top

Posted on 2001-06-04
1
146 Views
Last Modified: 2010-04-06
Hi All,

How do I prevent a form from flicking when I change its type from 'normal' to 'StayOnTop'?

Regards,
Dion.
0
Comment
Question by:Diono
1 Comment
 
LVL 4

Accepted Solution

by:
fva earned 50 total points
ID: 6152085
VCL doesn't handle too well the FormStyle Change because it needs to support all possible cases.

Instead of changing the style by FormStyle, use:

SetWindowPos(Handle,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE);

when going topmost and

SetWindowPos(Handle,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE);

when returning to normal state.

HTH,
F.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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