Results 1 to 4 of 4

Thread: Using a DC instead of Picture1.Picture

Threaded View

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Using a DC instead of Picture1.Picture

    I've used the code below to fill "bmp" with the details about the picture in "Picture1".
    VB Code:
    1. Private Type BITMAP
    2.     bmType As Long
    3.     bmWidth As Long
    4.     bmHeight As Long
    5.     bmWidthBytes As Long
    6.     bmPlanes As Integer
    7.     bmBitsPixel As Integer
    8.     bmBits As Long
    9. End Type
    10. Private bmp As BITMAP
    11.  
    12. GetObjectA Picture1.Picture, Len(bmp), bmp
    The problem is i'm no longer wanting to use a PicBox and have stored a picture in a DC I created instead. Does anyone know if there is a way to get these details from just the DC, The only part of "bmp" that I really need is "bmp.bmBits".

    Thanx to anyone that can help.
    Last edited by Electroman; Nov 2nd, 2002 at 03:01 PM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

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