Delphi 2007 on windows 7 just does nothing on the saveDialog.Execute call. I have seen another person mention this a few weeks back but it was with Borland c++.
-
1See the thread on newsgroups https://forums.embarcadero.com/thread.jspa?messageID=196950&tstart=0#196950 Problem there was resolved by deleting the executable name from "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" – Sertac Akyuz Jan 28 '10 at 16:42
-
Thanks for the link. Checked the key and the application name was not there. Found that I had to set the compatibility of the application to Windows XP and that resolved it. – JD. Jan 28 '10 at 17:06
-
Sertac, can you answer the question rather than commenting so that I can close the question as resolved. Thanks. – JD. Jan 28 '10 at 17:07
-
OK. I thought, since I was actually referring a possible answer, a comment was better. But you can always accept a better/descriptive answer anyway. – Sertac Akyuz Jan 28 '10 at 17:18
-
It clearly does *something*. Does it cause your program to crash? To hang? I think what you really meant is that it always returns False without displaying the expected dialog. – Rob Kennedy Jan 28 '10 at 17:22
-
@JD, 2nd comment: Setting the compatibility to XP would not cause the Vista style dialogs not to be used? – Sertac Akyuz Jan 28 '10 at 17:25
-
@Rob: Yes, just does not show the dialog and seems to exit the calling procedure. – JD. Jan 28 '10 at 18:35
2 Answers
See the thread "TOpenDialog.Execute not working " on embarcadero newsgroups.
Problem there was resolved by deleting the executable name from "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options"

- 54,131
- 4
- 102
- 169
I got the same problem (savedialog not working) in windows XP.
After lots of unsuccessful attempts according to the voluminous exchanges in the embarcadero group you mention (https://forums.embarcadero.com/thread.jspa?messageID=196950&tstart=0#196950).
I found what the reason was : the initial file dir and filename of the Savedialog12 were bad, contradicting each other, the filename containing the fullpath of the last file I had opened (I had thought it was smart to prepare the saving of the file I had opened last; unfortunately what I had put in the initialdir was equal to what I had put in the filename !)
The problem was already solved by clearing both fields of the save dialog.
Further, my initial goal to prepare the saving was reached by putting valid values in the involved fields :
SaveDialog1.FileName:=ExtractFileName(Opendialog1.Filename);
SaveDialog1.InitialFileDir:=ExtractFilePath(Opendialog1.Filename);

- 7,551
- 4
- 41
- 81

- 21
- 1
-
Almost 4 years later and the problem still exists for some. And this should be the accepted answer. It helped me anyway as the registry did not contain the mentioned key. – Mike Aug 30 '17 at 09:52