Loading Images Into a Right Click Menu

J

jamie

To anyone that can help:

I would like to images into a right click menu I have for an Access
application. So far, I load the menu, and my thought is using the
image list control, I grab the picture handle, compress it and load it
into the menu, but it is not working? Does anyone have ideas or
suggestions?

CODE:

******

DoCmd.OpenForm sImageForm, acNormal, , , , acHidden 'Load image
form
Set frmImage = Forms(sImageForm).Form: Set imgList =
frmImage.frmImageList.Object
hMenuImg = imgList.ListImages.Item(mMenu.sImage(iMenuIndex)).Picture
iCopyDC = CreateCompatibleDC(0)
iRet = StretchBlt(iCopyDC, 0, 0, 12, 12, hMenuImg, 0, 0, 22, 22,
SRCCOPY)
Call SetMenuItemBitmaps(iCopyDC, 1, MF_BYPOSITION, hMenuImg, hMenuImg)

******


Thanks,

Jamie
 
L

Lloyd Sheen

jamie said:
To anyone that can help:

I would like to images into a right click menu I have for an Access
application. So far, I load the menu, and my thought is using the
image list control, I grab the picture handle, compress it and load it
into the menu, but it is not working? Does anyone have ideas or
suggestions?

CODE:

******

DoCmd.OpenForm sImageForm, acNormal, , , , acHidden 'Load image
form
Set frmImage = Forms(sImageForm).Form: Set imgList =
frmImage.frmImageList.Object
hMenuImg = imgList.ListImages.Item(mMenu.sImage(iMenuIndex)).Picture
iCopyDC = CreateCompatibleDC(0)
iRet = StretchBlt(iCopyDC, 0, 0, 12, 12, hMenuImg, 0, 0, 22, 22,
SRCCOPY)
Call SetMenuItemBitmaps(iCopyDC, 1, MF_BYPOSITION, hMenuImg, hMenuImg)

******


Thanks,

Jamie

If you are using VB6 this is a dot.net group. Better to ask in classic vb
forum.

LS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top