<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:x =
"urn:schemas-microsoft-com:office:excel" xmlns:p =
"urn:schemas-microsoft-com:office:powerpoint" xmlns:a =
"urn:schemas-microsoft-com:office:access" xmlns:dt =
"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s =
"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs =
"urn:schemas-microsoft-com:rowset" xmlns:z = "#RowsetSchema" xmlns:b =
"urn:schemas-microsoft-com:office:publisher" xmlns:ss =
"urn:schemas-microsoft-com:office:spreadsheet" xmlns:c =
"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc =
"urn:schemas-microsoft-com:office:odc" xmlns:oa =
"urn:schemas-microsoft-com:office:activation" xmlns:html =
"http://www.w3.org/TR/REC-html40" xmlns:q =
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc =
"http://microsoft.com/officenet/conferencing" XMLNS:D = "DAV:" XMLNS:Repl =
"http://schemas.microsoft.com/repl/" xmlns:mt =
"http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2 =
"http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda =
"http://www.passport.com/NameSpace.xsd" xmlns:ois =
"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir =
"http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds =
"http://www.w3.org/2000/09/xmldsig#" xmlns:dsp =
"http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc =
"http://schemas.microsoft.com/data/udc" xmlns:xsd =
"http://www.w3.org/2001/XMLSchema" xmlns:sub =
"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec =
"http://www.w3.org/2001/04/xmlenc#" xmlns:sp =
"http://schemas.microsoft.com/sharepoint/" xmlns:sps =
"http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi =
"http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs =
"http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf =
"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p =
"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf =
"http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss =
"http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi =
"http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi =
"http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver =
"http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels =
"http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp =
"http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t =
"http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m =
"http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl =
"http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl =
"http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService"
XMLNS:Z = "urn:schemas-microsoft-com:" xmlns:st = ""><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META name=GENERATOR content="MSHTML 8.00.6001.18852">
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Comic Sans MS;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P {
        FONT-FAMILY: "Times New Roman","serif"; MARGIN-LEFT: 0cm; FONT-SIZE: 12pt; MARGIN-RIGHT: 0cm; mso-style-priority: 99; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle19 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US link=blue vLink=purple>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>I ended up installing Delphi, all components,
database and the project on a new Win 7 pc provided by the
customer.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>Tracing using the debug vcl units showed that the calls to
messagedlg and below were fine - just not showing the
dialog!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>Just for the hell of it I threw in an
Application.ProcessMessages immediately before the call and now it all works
again with or without the XP compatibility setting.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>The messagedlg was called after an intensive loop of data
processing, but I'm still not sure why the Application.ProcessMessages was
necessary for Windows 7.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>It's a worry for other situations as well - not seeing a
message is hardly something that most users would report or even know they were
missing.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=308570804-20012010><FONT color=#800000
size=2 face=Verdana>Steve</FONT></SPAN></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #800000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Jolyon Smith
[mailto:jsmith@deltics.co.nz] <BR><B>Sent:</B> Wednesday, 20 January 2010
11:36 a.m.<BR><B>To:</B> 'NZ Borland Developers Group - Delphi
List'<BR><B>Subject:</B> Re: [DUG] windows 7 and
messagedlg<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">Are
you sure that it is the message display that is being suppressed and not some
change in the runtime conditions that lead to your application even attempting
to display the message in the first place?<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">e.g.
(a completely made up example) :<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P style="TEXT-INDENT: 36pt" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">If
ForceDirectories( ‘ .. path to some folder in Program Files .. ’ )
then<o:p></o:p></SPAN></P>
<P style="TEXT-INDENT: 36pt" class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">
// .. display the message<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">User
reports message not being displayed, but the problem is actually a Win 7
permissions issue that is preventing ForceDirectories() from being successful,
not a failure to display the message.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt">This
is not a very plausible real-world example, but is intended only to illustrate
my point/question.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p> </o:p></SPAN></P>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: blue 1.5pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 4pt; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0cm">
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN
style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">
delphi-bounces@delphi.org.nz [mailto:delphi-bounces@delphi.org.nz] <B>On
Behalf Of </B>Stephen Barker<BR><B>Sent:</B> Wednesday, 20 January 2010 11:16
a.m.<BR><B>To:</B> NZ Borland Developers Group - Delphi
List<BR><B>Subject:</B> [DUG] windows 7 and
messagedlg<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Hi,</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I have a report
from a Windows 7 user that a message from my app does not show unless XP
compatibility mode is selected.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">The code that
should fire is:</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">
messagedlg(msg, mtCustom, [mbOk], 0);</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">It is being ignored
when run under normal Windows 7 default mode.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Any
ideas?</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I don't use Windows
7 here yet, but it looks like I may have to set up a test environment.
Actually I just have done a quick test using a simple Delphi exe on Win 7 and
it works fine. Must be something else in my app that is causing the messagedlg
to be suppressed. I guess I'll have to set up a full Delphi 2007 install with
components on Win 7 and debug this properly.<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<P><SPAN
style="FONT-FAMILY: 'Comic Sans MS'; COLOR: navy; FONT-SIZE: 7.5pt">Regards,<BR><BR>Steve
Barker<BR></SPAN><STRONG><SPAN
style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #ff8000; FONT-SIZE: 7.5pt">Webdata
Ltd</SPAN></STRONG><SPAN
style="FONT-FAMILY: 'Comic Sans MS'; COLOR: navy; FONT-SIZE: 7.5pt"><BR></SPAN><STRONG><SPAN
style="FONT-FAMILY: 'Comic Sans MS'; COLOR: #ff8000; FONT-SIZE: 7.5pt">ph +64
9 4103074</SPAN></STRONG><SPAN
style="FONT-FAMILY: 'Comic Sans MS'; COLOR: navy; FONT-SIZE: 7.5pt">
</SPAN><o:p></o:p></P>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV></DIV></DIV>
<P><FONT size=2 face=Arial>No virus found in this incoming message.<BR>Checked
by AVG - www.avg.com<BR>Version: 8.5.432 / Virus Database: 270.14.124/2597 -
Release Date: 01/19/10 07:34:00<BR></FONT></P>
<P><FONT size=2 face=Arial></FONT></P></BLOCKQUOTE></BODY></HTML>