Loading Images Into a Right Click Menu

  • Thread starter Thread starter jamie
  • Start date Start date
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
 
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
 
Back
Top