DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Displaying an image from Access

  1. #1
    Ousmane Diarra Guest

    Displaying an image from Access


    I am creating a small picture dictionary using ADO code and I have pbs loading
    the pictures from Access in a picture box.
    When a user click on the combo box, a picture should appear in a picture
    box with a label with translation.
    So far, I have been able to make everything works except displaying the pic.

    My program stops here at "WordPics.Picture = mHouse.Picture"
    The error msg is object required! So I used the loadpicture
    WordPics.Picture = loadpicture (mHouse.Picture) and I still got an error.

    Public Sub Fillfields()
    lblTraduction.Caption = mHouse.Word
    WordPics.Picture = mHouse.Picture
    End Sub

    Could anybody help me?

    Thanks


  2. #2
    Michael C. Guest

    Re: Displaying an image from Access


    "Ousmane Diarra" <diarra2789@hotmail.com> wrote:
    >


    Try using set as in the example below:

    Set PicPack.Picture = LoadPicture("\\s700-l4\mfg\appls\mscom\brandcode\img\"
    & gasFileName(sLineNo, index) & ".jpg")
    >




    >I am creating a small picture dictionary using ADO code and I have pbs loading
    >the pictures from Access in a picture box.
    >When a user click on the combo box, a picture should appear in a picture
    >box with a label with translation.
    >So far, I have been able to make everything works except displaying the

    pic.
    >
    >My program stops here at "WordPics.Picture = mHouse.Picture"
    >The error msg is object required! So I used the loadpicture
    >WordPics.Picture = loadpicture (mHouse.Picture) and I still got an error.


    >Public Sub Fillfields()
    >lblTraduction.Caption = mHouse.Word
    >WordPics.Picture = mHouse.Picture
    >End Sub
    >
    >Could anybody help me?
    >
    >Thanks
    >



  3. #3
    George Barker Guest

    Re: Displaying an image from Access


    Please provide me more detailed infos.

    What do you mean with '..I have pbs loading the pictures..'

    Which objects are these WordPics and mHouse. Are these objects StdPicture
    objects?
    Where is the ADO recordset that contains the picture field?

    At www.thb.nu you can find an imagecontrol that automatically handles dbbound
    pictures. And the doc and examples contain some useful decription to load
    a picture from a dbfield.

    -George

    "Ousmane Diarra" <diarra2789@hotmail.com> wrote:
    >
    >I am creating a small picture dictionary using ADO code and I have pbs loading
    >the pictures from Access in a picture box.
    >When a user click on the combo box, a picture should appear in a picture
    >box with a label with translation.
    >So far, I have been able to make everything works except displaying the

    pic.
    >
    >My program stops here at "WordPics.Picture = mHouse.Picture"
    >The error msg is object required! So I used the loadpicture
    >WordPics.Picture = loadpicture (mHouse.Picture) and I still got an error.
    >
    >Public Sub Fillfields()
    >lblTraduction.Caption = mHouse.Word
    >WordPics.Picture = mHouse.Picture
    >End Sub
    >
    >Could anybody help me?
    >
    >Thanks
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center