Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- From: "Patrice" <http://www.chez.com/scribe/>
- Date: Wed, 4 Jun 2008 18:43:58 +0200
Works fine here using the desktop as lDefaultPath and a .htm file.
I'm using 3.5...
Either :
- some other condition that causes Cancel to be returned (locked file ? non
writable location ?)
- a bug in your version of the framework
- a bug in your own code that makes the return value looks bad when it is
actually good
Good luck.
--
Patrice
"Joe Duchtel" <duchtel@xxxxxxxxx> a écrit dans le message de groupe de
discussion :
2dd9a2af-2096-4118-b71e-cbbce552edaa@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello -
I have the following code to detemine a file name when my application
is saving a file. The problem is that if the file already exists and
I select the Yes button in the "Do you want to replace" dialog, the
DialogResult is Cancel instead of OK. Is there something I am
missing?
Dim lSaveFileDialog As New SaveFileDialog
lSaveFileDialog.AddExtension = True
lSaveFileDialog.Filter = "PNG (*.png)|*.png"
lSaveFileDialog.InitialDirectory = lDefaultPath
lSaveFileDialog.OverwritePrompt = True
lSaveFileDialog.Title = "Save As"
Dim lDialogResult As DialogResult = lSaveFileDialog.ShowDialog()
Thanks,
Joe
.
- Follow-Ups:
- Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- From: Joe Duchtel
- Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- References:
- SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- From: Joe Duchtel
- SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- Prev by Date: Re: Unicode Character Issue
- Next by Date: Re: Unicode Character Issue
- Previous by thread: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- Next by thread: Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- Index(es):