I have this little piece of code:
CODE
Dim saveFileDialog2 As New SaveFileDialog()
saveFileDialog2.Title = "Name the file..."
saveFileDialog2.ShowDialog()
saveFileDialog2.OverwritePrompt = True
saveFileDialog2.RestoreDirectory = True
If saveFileDialog2.FileName <> "" Then
' save file code here
End If
Anyways, when I actually save the file, it asks me if I want to overwrite an existing file. If I say yes, the program crashes and an exception is thrown:
" Could not complete operation since a file already exists in this path 'C:\example.jpg'. "
Is it an easy fix or is it complicated?
I'm getting tired with Vb at this point

Thanks again for your help. (I started Vb programming just a few days ago- so I'm not good with Windows-related programming. I'm a C++/DirectX10 game programmer though). It's so simpler than C++, yet so difficult? lol!
Thanks again
This post has been edited by VbProgrammer08: 1 Jun, 2008 - 02:15 PM