Duane

Duane

  • NA
  • 77
  • 0

problem saving bitmap

Jun 30 2012 5:40 PM
I am having a problem saving a bitmap image. The following code is the part of the program in question. Please tell me what I am doing wrong.

Try

    Dim bmp As New Bitmap("C:\Documents and Settings\Owner\My _

                                          Documents\Pentomioes\0001.bmp")

    bmp.Save("C:\Documents and Settings\Owner\My _

                                          Documents\Pentomioes\0001.bmp")

    bmp.Dispose()

    'g.Dispose()

Catch ex As Exception

    MsgBox(ex.ToString)

End Try


Also here is the exception report I get:

System.ArgumentException: Parameter is not valid.

at System.Drawing.Bitmap..ctor(String filename)

at Form1.btnMatch_Click(Object sender, EventArgs e) in C:\Documents and

Settings\Owner\my documents\visual studio 2010\Projects\Form1.vb:line 2619.




Answers (2)