save pictures while i scrap them from website using vb.net : hi guys i find a code on youtube when i use it on my visual basic and debug it and find pictures but when i want to save them software gives me this message
[enter image description here][1]


  [1]: http://i.stack.imgur.com/EJhK7.jpg


and this is code i use 

Private Sub btnSaveImages_Click(ByVal sender As  _
        System.Object, ByVal e As System.EventArgs) Handles _
        btnSaveImages.Click
        Dim dir_name As String = txtDirectory.Text
        If Not dir_name.EndsWith("\") Then dir_name &= "\"

        For Each pic As PictureBox In flpPictures.Controls
            Dim bm As Bitmap = pic.Image
            Dim filename As String = pic.Tag
            filename = _
                filename.Substring(filename.LastIndexOf("/") + _
                1)
            Dim ext As String = _
                filename.Substring(filename.LastIndexOf("."))
            Dim full_name As String = dir_name & filename

            Select Case ext
                Case ".bmp"
                    bm.Save(full_name, Imaging.ImageFormat.Bmp)
                Case ".gif"
                    bm.Save(full_name, Imaging.ImageFormat.Gif)
                Case ".jpg", "jpeg"
                    bm.Save(full_name, Imaging.ImageFormat.Jpeg)
                Case ".png"
                    bm.Save(full_name, Imaging.ImageFormat.Png)
                Case ".tiff"
                    bm.Save(full_name, Imaging.ImageFormat.Tiff)
                Case Else
                    MessageBox.Show( _
                        "Unknown file type " & ext & _
                        " in file " & filename, _
                        "Unknown File Type", _
                        MessageBoxButtons.OK, _
                        MessageBoxIcon.Error)
            End Select
        Next pic

        Beep()
    End Sub