ImageMan ActiveX Control Version 8
hImageData Property
See Also  Example  Send comments on this topic.

Glossary Item Box


Returns a handle containing a Global memory block containing the image in the format specified by the MemoryFormat property. Setting this property will load an image from the specified memory block.

Property type

Read-write property


Visual Basic
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.


(Visual Basic)Copy Code
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

See Also

© 2014 Data Techniques Inc. All Rights Reserved.