How can I extract the bits from an ImageList Image in Access 97 
Author Message
 How can I extract the bits from an ImageList Image in Access 97

I want to be able to use ImageList Images as CommandButton pictures
but in Access. The Access command button does not allow you to set the
picture property to an image list picture as the vb one's do. But the
Access command button's Picture Data property is settable.  This
property is a Byte array that I think is identical to the BITMAPINFO
structure that in vb is retreivable using GetDIBits api function.

Problem is that this api needs the device context of the object
holding the image as well as a handle to the image itself.

You can't get dc's in access (well not without the focus being on the
object) as far as I know.

However, if its relevant, when used on an Access form,
ImageList.ListImages(index).Picture returns an IPictureDisp object
whose Handle property is a Long which is acceptable to several other
api's as a reference to the image (pre-loaded into memory I think.)

Can anyone please help with his?



Sun, 13 Feb 2005 21:13:53 GMT  
 How can I extract the bits from an ImageList Image in Access 97
Please do not multipost but crosspost instead.
I answered your post over in one of the Access NG's.

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Quote:
> I want to be able to use ImageList Images as CommandButton pictures
> but in Access. The Access command button does not allow you to set the
> picture property to an image list picture as the vb one's do. But the
> Access command button's Picture Data property is settable.  This
> property is a Byte array that I think is identical to the BITMAPINFO
> structure that in vb is retreivable using GetDIBits api function.

> Problem is that this api needs the device context of the object
> holding the image as well as a handle to the image itself.

> You can't get dc's in access (well not without the focus being on the
> object) as far as I know.

> However, if its relevant, when used on an Access form,
> ImageList.ListImages(index).Picture returns an IPictureDisp object
> whose Handle property is a Long which is acceptable to several other
> api's as a reference to the image (pre-loaded into memory I think.)

> Can anyone please help with his?



Tue, 15 Feb 2005 06:55:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Extracting a row from a table using VB in Access 97

2. Extract fields in VBA (from Access 97)

3. Canned objects and/or images

4. Viewing a SQL Server image field in Access 97

5. Access 97 problem: Image in report

6. Error when trying to save a BMP file from image control in an Access 97 db

7. Use MsAccess 97 DB with Visual Basic 4.0 (16 Bits)

8. Access 97: VBA-DAO-Access 97 synchronization problem?

9. Extracting OLE images from Access database

10. How to extract text from a dll in VB4 (16 bits)

11. Ques 1: Shifting Bits / Extracting Bit values?

12. Cans access2.0 engine access btrieve files?

 

 
Powered by phpBB® Forum Software