Results 1 to 3 of 3

Thread: Loading binary data to a PictureBox

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    Question

    Hi everyone..

    I'm am insterested in finding a method to load my images onto a PictureBox.
    I can't use the LoadPicture function, since the images are stored in a database, so I therefore have the binary data in a variable and not in a file.

    Neither is the Picture property usefull since it does not take binary data, but just a hDC value (i think).

    So the question is, how can I load images onto af PictureBox from binary data in a database?


    Hope someone can help me :-)

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well you could write the variable to the drive and then use loadpicture or picture.

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    or you could use CreateDIBitmap with an array of the pixels and attach it to a DC and blit it over
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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