|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SaveFileDialogIn my VB .Net WinForm app, SaveFileDialog gives me an error msg
"C:\MyFile.txt already exists. Do you want to replace it?" What I need to do is to append something to an existing file, so I want to avoid this warning msg. I included "SaveFileDialog.CheckFileExists = False" in my code, but the warning msg keeps showing up. Please help, thanks. Don't use the save file dialog & use stream writer
Dim sw As New IO.StreamWriter(C:\SomeFile.txt", True) sw.WriteLine("You Text Here") sw.Flush() sw.Cloase() "John" <J***@discussions.microsoft.com> schrieb: I am not able to repro this behavior with .NET 1.1, Windows XP Professional > In my VB .Net WinForm app, SaveFileDialog gives me an error msg > "C:\MyFile.txt already exists. Do you want to replace it?" SP2 with a SaveFileDialog placed on a form. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Errata:
>> In my VB .Net WinForm app, SaveFileDialog gives me an error msg Sorry, I had a bug in my code which leaded to wrong results. The >> "C:\MyFile.txt already exists. Do you want to replace it?" > > I am not able to repro this behavior with .NET 1.1, Windows XP > Professional SP2 with a SaveFileDialog placed on a form. 'OverwritePrompt' property of 'SaveFileDialog' is set to 'True' by default. By changing its value 'False' prior to showing the dialog the messagebox is not shown. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Solved, thanks.
SaveFileDialog.OverwritePrompt = False Show quoteHide quote "John" wrote: > In my VB .Net WinForm app, SaveFileDialog gives me an error msg > "C:\MyFile.txt already exists. Do you want to replace it?" > > What I need to do is to append something to an existing file, so I want to > avoid this warning msg. I included "SaveFileDialog.CheckFileExists = False" > in my code, but the warning msg keeps showing up. > > Please help, thanks. > Set the OverwritePrompt property to false.
HTH, Sam On Wed, 30 Mar 2005 11:15:07 -0800, "John" <J***@discussions.microsoft.com> wrote: >In my VB .Net WinForm app, SaveFileDialog gives me an error msg B-Line is now hiring one Washington D.C. area VB.NET >"C:\MyFile.txt already exists. Do you want to replace it?" > >What I need to do is to append something to an existing file, so I want to >avoid this warning msg. I included "SaveFileDialog.CheckFileExists = False" >in my code, but the warning msg keeps showing up. > >Please help, thanks. > developer for WinForms + WebServices position. Seaking mid to senior level developer. For information or to apply e-mail resume to sam_blinex_com.
Refresh DataSet - please Help Me :-(
Get Variable Out of Arraylist ReInstantiate an Object? Advice needed How can I determine WHICH exception I got in my CATCH? using StringBuilder class for concatenation? how to convert... Storing multiple text files inone file. How to restrict the multiple opening of the Same window... a checkbox in a datagrid |
|||||||||||||||||||||||