Public Property hImageData As Integer
To write an image to memory, set the MemoryFormat property to the extension of the desired image format and then query this property. After querying this property the ImageDataSize property will contain the size of the image data in memory.
To load an image from memory into the Image control, set the ImageDataSize property to the size of the image in memory and then set this property to the handle of the globally allocated memory block containing the image.
Dim hMemoryBlock As Long Dim ImageSize As Long ' Save the Image in JPEG Format in Memory ImageControl1.MemoryFormat = "JPG" ' hMemoryBlock will get the Handle to a global memory block containing ' the JPG Compressed image hMemoryBlock = ImageControl1.hImageData ' Query the size of the JPG image in the memory block ImageSize = ImageControl1.ImageDataSize 'Loading an image from a memory block ' Size of Image Data in memory block in bytes if known ImageControl1.ImageDataSize = ImageSize ' hMemoryBlock is a Handle to a globally allocated memory block. ImageControl1.hImageData = hMemoryBlock