Results 1 to 9 of 9

Thread: Stream to PictureBox: What's wrong? (RESOLVED)

Threaded View

  1. #1

    Thread Starter
    Addicted Member AlvaroF1's Avatar
    Join Date
    Sep 2002
    Location
    SP - Brazil
    Posts
    200

    Question Stream to PictureBox: What's wrong? (RESOLVED)

    VB Code:
    1. Dim myStream As IO.MemoryStream = New IO.MemoryStream()
    2. Dim myByte(myStream.Length) As Byte
    3. myByte = CType(myOleDbDataReader.Item("myImageField"), Byte())
    4. myStream.Write(myByte, 0, myByte.GetUpperBound(0))
    5. PictureBox1.Image.FromStream(myStream)
    The problem is that no image is displayed. I'm sure there is an image in "myImageField".

    What to do?


    Thanks.
    Last edited by AlvaroF1; Oct 27th, 2003 at 08:37 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width