4
votes

I have an application written by Delphi 7 and this application works fine in windows XP.

Now i has upgrade my pc to windows 7 and everythings works fine with this application except when i click the button which will execute the TOpenDialog and TSaveDialog then hangs.

Anyone have this problems when using delphi 7 in windows 7?

1
I can't answer this without seeing some code. Could you show us the code which invokes the file dialogs. - David Heffernan
Unfortunately I had this problem with Delphi 2010 and Windows 7. Doesn't work from the debugger, works fine from outside the debugger. The same code works fine under the debugger on a different machine. Probably has something to do with the interaction between the debugger and some windows shell extension. It was too weired, I didn't manage to find a solution. - Cosmin Prund
Does it hang or does 'execute' return doing nothing? If the latter, this is a duplicate of "SaveDialog.Execute not doing anyting in window 7". Anyway, see if the answers there would help.. - Sertac Akyuz
I had a similar problem (Delphi 2009) that one of my users experienced. It would take around 60 to seconds for Windows to bring up the open dialog (not in debug mode). It only happened on his computer and stopped by itself after a while. We never figured out what caused it. - boileau

1 Answers

5
votes

Most likely reason is an issue with COM. The Open/Save dialog needs to run in an STA COM apartment otherwise some shell extensions can lock up.

If you have anything in your application which initializes COM in a different mode for the main thread, lots of strange things can happen.