Wanted: SaveFileDialog without Confirm: Windows

Hi folks: I need a SaveFileDialog without Confirm when selecting a pre-existing file. Does anyone know how to do this with Xojo?

Reason: this app is almost always overwriting pre-existing files, and continually clicking on the Confirm dialog box becomes annoying for the end-users, and, of course, they quickly stop checking the file name for correctness. The Confirm box becomes the proverbial cry of “Wolf !”.
Thx

Annoyingly, the Windows ‘default’ savefile dialog has a property that determines whether you are prompted or not.
The Xojo savedialog does not expose that property
Nor does the MBS equivalent

In days gone by I could invoke a save dialog from the commoncontrols OCX
But MS don’t ship that with Windows 10 onwards, I gather. (could be wrong…?)

I had hopes of trying it with an OLEContainer
Selected Microsoft Common Controls in the IDE,

added this code to a button

  OLEContainer1.Content.Value("initialdir") =""
  OLEContainer1.Content.Value("OverwritePrompt") =false
  OLEContainer1.Content.Invoke("showopen")

But I get a nil object error that I dont know how to fix.

I’m afraid this is not correct: Monkeybread Xojo plugin - WinFileDialogMBS properties
:wink:

Thats great. A different class/plugin to the one I found when searching on the monkeybread site, but welcome!

1 Like

Thank you, Arnaud. Exactly what I need. MBS is the answer. Now everyone is happy :slight_smile:

1 Like