Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27336

cant save with folderbrowsedialog

$
0
0
hey all ;)
i have this application which is supposed to let me save items, but it doesnt save..
the idea is simple, i have a few pictureboxes(not fixed amount). They all have Tags with their name i.e. flower.jpg
now i want to save them all in one folder with their tag as name, so I use a folderbrowsedialog(savefiledialog doesnt let me save multiple)
This is my code: but it doesnt save anything??
Code:

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim dlgResult As DialogResult = FolderBrowserDialog1.ShowDialog()

        If dlgResult = Windows.Forms.DialogResult.OK Then
            For Each pb As PictureBox In Me.saveitemsholder.Controls
                pb.Image.Save(FolderBrowserDialog1.SelectedPath + pb.Tag)
            Next pb
        End If
    End Sub

thanks in advance

Viewing all articles
Browse latest Browse all 27336

Trending Articles