ActiveX - Image Control - Picture Property 
Author Message
 ActiveX - Image Control - Picture Property

VB5 - VB6 on the shelf(all my DOCS are VB5)
I'm trying to create an ActiveX control that I can use in VBA under
Access. In VB5 Form Design view I need to create a memory metafile on
the fly and assign it to an Image control on my ActiveX container.

in VBA at Form Design time I can do:

1) Crea{*filter*}hMetaFile
2) GetEnhMetaFileBits
3) apiCopyMemory(varpicture(8), ByVal lngMemoryLock, lngAllocMem)

'Setup first 8 bytes special EM record to show ctl placement to mimic
Access's memory profile of a loaded 'metafile

   'EOF = 14
    'Bytes 0 -7  = (14,0,0,0,50,50,0,0)
    varpicture(0) = 14
    varpicture(4) = 50
    varpicture(5) = 50

4)   ctlImage.PictureData = varpicture

The VBA Image control now displays the created metafile. As the control
is resized it looks after resizing its contents.

The Image control in VB5 has a Picture property but not an actual
PictureData property. The helpfiles say you can do Picture1.Picture =
Can I somehow do Image.Picture = varpicture

I understand how I could PLAY the metafile into the image control. But
is that the same thing as loading or in this case assigning the
metafiles contents to the Image.Picture property.

My logic here, or lack thereof, is to have the Image control, set to
stretch, to look after all resizing requests. This will ensure that the
control is always automatically displaying its contents at the proper
resolution, whether screen or the printer.

If you hadn't already guessed, :-) this is my first ActiveX control.
It's finished except for the details with the Image control.

Thanks for any input.

Stephen Lebans

http://www.*-*-*.com/ ~slebans/

Thu, 29 Nov 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How to copy hDC property of picture control to an image control

2. Saving and retrieving image control picture property in MSSQL7

3. aving and retrieving image control picture property in MSSQL7

4. Image Datatype - binding datasource to a controls picture property

5. Copy a picture from a Picture Control in a Image Control

6. Large images in Picture or Image Control

7. TIF images in Image or Picture Control

8. Store the image in picture box control into the image data type in SQL server

9. Moving an image stored in a database to an image/picture control

10. Replacing a pictures properties with another pictures properties

11. Setting the picture property of an image

12. Picture Property Of Image


Powered by phpBB® Forum Software