Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Save and Open File Dialogs

edited February 2017 in End User
I have recently started having a problem with these dialogs hanging
when used in RBuilder.

I don't use the standard TOpenDialog and TSaveDialog's in my
application but it seems that you do.

I use Delphi Berlin 10.1 Update 2.

Could you please let me know if you have come across this at all?

Thanks.

Comments

  • edited February 2017
    Some further info on this.

    The dialog is not displayed at all. I am on Windows 7.

    if I change the following in function TppTemplate.ShowFileSaveDialog:

    lSaveDlg.Options:= [ofOverWritePrompt, ofPathMustExist, fHideReadOnly];

    to:

    lSaveDlg.Options:= [ofOverWritePrompt, ofPathMustExist, fHideReadOnly,
    ofOldStyleDialog];

    the dialog then displays and works fine.
  • edited February 2017
    Hi Ken,

    Have not heard of this before.

    Do TOpenDialog/TSaveDialog work outside of RB? For example if you create a
    trivial project with a Form and the dialogs, do they work?

    Do they work at Delphi design-time from the Designer?

    Are you using Vcl styles?




    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2017
    Hi Nard,

    They work fine in a simple project but not in my main product either
    from RB or direct. They also work at design time.

    I am not using VCL styles.

    Regards,

    Ken
  • edited February 2017
    On 07/02/2017 08:03, Ken Randall wrote:

    Try putting this in an early Initialization section of your project:

    UseLatestCommonDialogs := True;

    Its also worth trying passing the application's main form handle to the
    Execute method, e.g.

    if SaveDialog.Execute(Application.MainForm.Handle) then
  • edited February 2017

This discussion has been closed.