The standard dialog is not displayed

I have a form with TSaveDialog. When you call the Execute function, it does not appear when starting from the IDE. A popup window does when offline. Testing it a bit more, I found that all TSave / TOpen dialogs do not work. Not working means that Execute returns False without a pop-up window (see. Updated code example: the message "False" always appears, without preceding the dialog). Other dialogs (font / color / etc.) Do work.

 procedure TForm1.Button1Click(Sender: TObject); begin if OpenPictureDialog1.Execute then ShowMessage ('True') else ShowMessage ('False'); end; 

When starting without debugging, a dialog box does not appear. It also does not matter if the Release or Debug configuration is selected.

The IDE seems to be doing something weird. There are two TSaveDialog components in the form, and both have the same behavior.

Any idea what is wrong?

Update 1 using Delphi XE on Windows 7. Other projects using TSaveDialogs work fine.

Update 2 The original TSaveDialog question has been found to apply to all TSave / TOpen dialog boxes. The question has been modified to include this knowledge.

Update 3 I found this link a similar error. However, I checked the registry, but could not find the executable, as mentioned. And imho doesn’t apply the hint for changing compatibility with XP, because TSaveDialog works fine outside the IDE.

+2
source share
1 answer

If you are using XE2, you must ensure that you do not have entries in the "User Overrides" entry in the Environment Environment block. "Enable system variables" does not work without it, only user-defined environment variables are located in the environment block with the start of the EXE, but in the open / save dialog some system variables are required, such as "SystemDrive" and "SystemDrive", SystemRoot " .

Alternatively, you can install the IDE Fix Pack , which fixes the “Enable system variables” option.

+6
source

Source: https://habr.com/ru/post/1433828/


All Articles