Re: Load image from DB into PictureBox control
- From: "Jim Hughes" <NOSPAMJ3033@xxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 19:22:24 -0700
ba = CType( .Photo, Byte() )
"K. Wilder" <KWilder@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:060EBEB6-0BDE-4B68-AE26-D6FDAD94ED99@xxxxxxxxxxxxxxxx
> Tim,
>
> I tried your Google example and got an "Invalid parameter used" error.
>
> This is my code:
>
> Dim ba() as Byte
> ba = .Photo
> Dim ms As New IO.MemoryStream(ba)
> Me.picBox.Image = Image.FromStream(ms)
>
> Any ideas?
>
> Thanks,
>
> King Wilder
>
>
> "Tim Wilson" wrote:
>
>> If the image is in a Byte array then you could create a MemoryStream
>> using
>> this Byte array, then call the shared FromStream method of the Image
>> class
>> passing in the MemoryStream. There's some sample code at the link below.
>>
>> http://www.google.ca/groups?hl=en&lr=&selm=erQHZobLEHA.2388%40TK2MSFTNGP09.phx.gbl
>>
>> --
>> Tim Wilson
>> ..Net Compact Framework MVP
>>
>> "K. Wilder" <KWilder@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:36DBE9AA-58C0-4FFB-8D22-45F985F49C23@xxxxxxxxxxxxxxxx
>> > In VB.Net, does anyone know how to load an image from, example
>> > Northwind
>> DB
>> > employees table, to a picture box control?
>> >
>> > The Image is in Byte format and I can't figure out how to convert it to
>> > an
>> > image.
>> >
>> > Thanks,
>> >
>> > King Wilder
>>
>>
>>
.
- Follow-Ups:
- Re: Load image from DB into PictureBox control
- From: K. Wilder
- Re: Load image from DB into PictureBox control
- References:
- Load image from DB into PictureBox control
- From: K. Wilder
- Re: Load image from DB into PictureBox control
- From: K. Wilder
- Load image from DB into PictureBox control
- Prev by Date: Re: Load image from DB into PictureBox control
- Next by Date: Re: Changing column header color on a DataGrid
- Previous by thread: Re: Load image from DB into PictureBox control
- Next by thread: Re: Load image from DB into PictureBox control
- Index(es):
Relevant Pages
|