none
System.Runtime.InteropServices.ExternalException: A Generic Error Occured in GDI+. RRS feed

  • Question

  • Hi frends, pls take a look at this...

     

    I've searched google many times....i couldn't find an apt solution..

     

    I'm working on framework 1.1....

     

    Here is my vb.net code..on save button click event...

     

    Dim selqry As String = "SELECT [company].[id],[company].[company],[company].[logo] FROM [COMPANY] WHERE " _

    & "[company].[company]='" & company & "'"

    Dim dscomp As New DataSet("dscomp")

    Call execSelectQry(selqry, dscomp)

     

    ....this method fills the dataset with requested data.... then

     

    Dim ms As New MemoryStream

    pic_clogo.Image.Save(ms, pic_clogo.Image.RawFormat)

     

    ...where pic_clogo is a picture box....the last line is throwing exception....when i click save button for second time....

    then if i reload the image into the picture box and click save..it is not giving error...

     

    whats wrong...?

    Friday, November 23, 2007 2:06 PM