<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<DIV><SPAN class=533294708-25082010><FONT color=#0000ff size=2 face=Arial>even
office 10 has this problem on win7 so it is an inheint windows problem :(
Maurice</FONT></SPAN></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left><FONT size=2
face=Tahoma>-----Original Message-----<BR><B>From:</B>
delphi-bounces@delphi.org.nz [mailto:delphi-bounces@delphi.org.nz] <B>On
Behalf Of </B>Jeremy Coulter<BR><B>Sent:</B> Tuesday, 24 August 2010 10:51
a.m.<BR><B>To:</B> NZ Borland Developers Group - Delphi
List<BR><B>Subject:</B> Re: [DUG] SetWindowPos
HWND_TOPMOST<BR><BR></FONT></DIV>or....write your own dialogs
:-)<BR><BR>jeremy<BR><BR>
<DIV class=gmail_quote>On Tue, Aug 24, 2010 at 10:32 AM, John Bird <SPAN
dir=ltr><<A
href="mailto:johnkbird@paradise.net.nz">johnkbird@paradise.net.nz</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
lang=EN-NZ name="Compose message area" vlink="purple" link="blue">
<DIV><FONT size=2 face=Arial>Not just Delphi - its an ancient Windows
problem AFAIK. Even in Windows 7 I have seen a control
panel applets puts a modal dialog behind the window - often the best
solution is Windows+D (show desktop) and go thru all windows with
alt+Tab and usually the hidden modal dialog is found.
Usually.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>John</FONT></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV><FONT size=2 face=Arial></FONT><BR> </DIV>
<DIV>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125)">HI have seen this
even happen in D2007 ! so I am not sure if it has been sorted in later
Delphi versions. I have seen other Windows apps. Not written in Delphi
Exhibit the same thing, so is it a Delphi thing, or a Windows thing?? P.s
this happens on XP, Vista and Win7 that I have noticed.</SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125)"></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125)">Jeremy</SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125)"></SPAN> </P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(181,196,223) 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt"
lang=EN-US>From:</SPAN></B><SPAN style="FONT-SIZE: 10pt" lang=EN-US> <A
href="mailto:delphi-bounces@delphi.org.nz"
target=_blank>delphi-bounces@delphi.org.nz</A> [mailto:<A
href="mailto:delphi-bounces@delphi.org.nz"
target=_blank>delphi-bounces@delphi.org.nz</A>] <B>On Behalf Of </B>Ross
Levis<BR><B>Sent:</B> Friday, 20 August 2010 22:04<BR><B>To:</B> 'NZ Borland
Developers Group - Delphi List'<BR><B>Subject:</B> [DUG] SetWindowPos
HWND_TOPMOST</SPAN></P></DIV></DIV>
<P class=MsoNormal> </P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt">I
have a window in my app which needs to be set to stay on top of all
others. In D7, if a modal dialog is activated from this window such as
a TOpenFile, it appears underneath the window. I believe later
versions of Delphi resolve this problem.</SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt"></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt">I
got around the issue by using SetWindowPos with HWND_NOTOPMOST just before
the dialog is activated, and set it back again afterwards.</SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt"></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt">This
works well generally, but a few users have complained of the entire app
hanging either before the dialog appears or after it closes. I’ve
noticed this maybe twice over the last few years using XP.</SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt"></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt">Is
this an XP bug or Delphi getting confused?</SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt"></SPAN> </P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt">Perhaps I should try a
Application.ProcessMessages after the SetWindowsPos.</SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt"></SPAN> </P>
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 12pt">Ross.</SPAN></P></DIV></DIV></DIV>
<P></P>
<HR>
<P></P>_______________________________________________<BR>NZ Borland
Developers Group - Delphi mailing list<BR>Post: <A
href="mailto:delphi@delphi.org.nz"
target=_blank>delphi@delphi.org.nz</A><BR>Admin: <A
href="http://delphi.org.nz/mailman/listinfo/delphi"
target=_blank>http://delphi.org.nz/mailman/listinfo/delphi</A><BR>Unsubscribe:
send an email to <A href="mailto:delphi-request@delphi.org.nz"
target=_blank>delphi-request@delphi.org.nz</A> with Subject:
unsubscribe</DIV><BR>_______________________________________________<BR>NZ
Borland Developers Group - Delphi mailing list<BR>Post: <A
href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</A><BR>Admin: <A
href="http://delphi.org.nz/mailman/listinfo/delphi"
target=_blank>http://delphi.org.nz/mailman/listinfo/delphi</A><BR>Unsubscribe:
send an email to <A
href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</A>
with Subject: unsubscribe<BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>