ahmad_hamdan
Member
- Joined
- May 24, 2010
- Messages
- 19
- Programming Experience
- Beginner
hello everyone,
i have a small code to save an image, i use a savefiledialog to set the path and image name when i try to save to an already existing image, a prompt is supposed to be shown since i am setting overwriteprompt to true but the problem it won't show and the save file dialog just hangs in there and i can't close it or do anything in it, i know the prompt dialog is there but i can't see it.
I am using .net framework 4.0 with visual studio 2010 and my windows is windows 7 home premuim 64bit
here is my save file dialog code:
Can you please help me with it?
i have a small code to save an image, i use a savefiledialog to set the path and image name when i try to save to an already existing image, a prompt is supposed to be shown since i am setting overwriteprompt to true but the problem it won't show and the save file dialog just hangs in there and i can't close it or do anything in it, i know the prompt dialog is there but i can't see it.
I am using .net framework 4.0 with visual studio 2010 and my windows is windows 7 home premuim 64bit
here is my save file dialog code:
VB.NET:
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
If bm IsNot Nothing Then
If svfd.ShowDialog = DialogResult.OK Then
If svfd.FileName.EndsWith(".jpg") Then
SaveImage(ImageFormat.Jpeg)
Else
If svfd.FileName.EndsWith(".GIF") Then
SaveImage(ImageFormat.Gif)
End If
End If
End If
End If
End Sub
Private Sub SaveImage(ByVal extension As ImageFormat)
bm.Save(svfd.FileName, extension)
End Sub
Can you please help me with it?
Last edited: