Re: Load Picture from MS Access to VB6

Tech-Archive recommends: Speed Up your PC by fixing your registry



I have the field that the pictures are stored in defined as an OLE Object.

In VB, I have an image box inside of a picture box. I used some code that
someone suggested on this newsgroup for resetting the size of the picture to
the size of the image box. The image box is then linked to the appropriate
field in the Access database. The image resize function is actually only
exectued when the image box is double-click, so that should not be affecting
anything. Any ideas would be appreciated? If you need anymore information,
just let me know.

When you load your pictures into the PictureBox, do they resize themselves
to the size of the PictureBox? That's really the only operation I need
performed on the picture.

Thanks,
The Merg

--
Today's problems don't worry me,
I haven't solved yesterday's yet.

"Paul Clement" <UseAdddressAtEndofMessage@xxxxxxxxxxxxxx> wrote in message
news:3biro1t5i9ka0mbqcma9ih3df10cnka7im@xxxxxxxxxx
> On Tue, 29 Nov 2005 17:02:06 -0500, "The Merg"
> <howard_mergler@xxxxxxxxxxxxxxxxxx> wrote:
>
> ¤ I have an app in VB6 that is connected to a MS Access 2000 database. I
> am
> ¤ connecting to the database with DAO. I have a field in one of my tables
> that
> ¤ contains pictures in possibly JPG, GIF or BMP format (usually JPG
> though). I
> ¤ am trying to get the image to display on a form when viewing records
> from
> ¤ the table. The issue I have of course though is that you cannot set the
> ¤ Picture property of a Picture Box to a JPG or GIF file. Although help
> says
> ¤ you can set to a JPG or GIF file, it fails when loading the picture. The
> ¤ help on the error box then says that you can only assign a BMP, ICO or
> ¤ windows metafile to the picture property.
>
> I have no problem loading a JPG or GIF to a PictureBox. Are you getting an
> error?
>
> ¤ I have found some code to do this, but they seem to use ADO, which I am
> ¤ trying to stay away from (as I'm not very adept at it, plus it adds
> extra
> ¤ weight to my app). Has anyone found something that works with DAO?
>
> How are/were the pictures stored in Access?
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)


.



Relevant Pages

  • strange issue with internet explorer
    ... to save graphics. ... even when the picture is a jpg or gif file. ... I should be able to select jpg as a filetype so I can see which jpg ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: How to store pictures in Access2k db in OLEObject field?
    ... ¤> How To Read and Write BLOBs Using GetChunk and AppendChunk ... with a .jpg into a picture object? ... There is no way I'm aware of get the blob into a PictureBox directly using either the GetChunk or ...
    (microsoft.public.vb.database.ado)
  • Re: New VB User Needs Help
    ... ¤> link in the frame under the picture of the VS2005 box. ... ¤> page it takes you to, scroll down until you see the title "About ...
    (microsoft.public.vb.general.discussion)
  • Re: Display a pic in VB
    ... ¤ Hello, ... search for a catalogue number 3, it will show me in more detail what ... the catalogue 3 have and a small picture of the catalogue. ... My data is store in a MS Access ...
    (microsoft.public.vb.syntax)
  • Re: Display a pic in VB
    ... ¤ Hello, ... search for a catalogue number 3, it will show me in more detail what ... the catalogue 3 have and a small picture of the catalogue. ... My data is store in a MS Access ...
    (microsoft.public.vb.database)