I ended up installing Delphi, all components, database and the project on a new Win 7 pc provided by the customer. Tracing using the debug vcl units showed that the calls to messagedlg and below were fine - just not showing the dialog! 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. 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. 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. cheers, Steve
_____ From: Jolyon Smith [mailto:[email protected]] Sent: Wednesday, 20 January 2010 11:36 a.m. To: 'NZ Borland Developers Group - Delphi List' Subject: Re: [DUG] windows 7 and messagedlg 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? e.g. (a completely made up example) : If ForceDirectories( ' .. path to some folder in Program Files .. ' ) then // .. display the message 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. This is not a very plausible real-world example, but is intended only to illustrate my point/question. From: [email protected] [mailto:[email protected]] On Behalf Of Stephen Barker Sent: Wednesday, 20 January 2010 11:16 a.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] windows 7 and messagedlg Hi, I have a report from a Windows 7 user that a message from my app does not show unless XP compatibility mode is selected. The code that should fire is: messagedlg(msg, mtCustom, [mbOk], 0); It is being ignored when run under normal Windows 7 default mode. Any ideas? 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. Regards, Steve Barker Webdata Ltd ph +64 9 4103074 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.432 / Virus Database: 270.14.124/2597 - Release Date: 01/19/10 07:34:00
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [email protected] with Subject: unsubscribe
