Results 1 to 3 of 3

Thread: Blt from file to picture box

  1. #1

    Thread Starter
    Addicted Member hypnos's Avatar
    Join Date
    Aug 2000
    Location
    UK
    Posts
    183

    Smile

    Hi Guys,
    I have a file in the directory c:\images called tex1.jpg. The dimentions of the file are 32*32. I would like to blt this file (using windows BitBlt) to a picture box called picTextures at possition 0, 0. Could you please tell me how? Thanks

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    There are two ways:

    The easy way - Load the picture into a picturebox or offscreen DC and blit it then...

    The little bit more difficult way - Use the code from http://rookscape.com/vbgaming/tutAX.php to read a bitmap manually and use StretchDIBits to blit it (the same thing I use with the Compressed Bitmaps sample at my site, if you're interested, it can be found at VB Code -> DX7 Tutorials -> Compressing bitmaps with the zLib DLL, the compression program doesn't have anything to do with DX7 btw)...

    Good luck!
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3

    Thread Starter
    Addicted Member hypnos's Avatar
    Join Date
    Aug 2000
    Location
    UK
    Posts
    183
    Thanks for the help

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