469,950 Members | 2,480 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Loading Images Into a Right Click Menu

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
Jul 18 '08 #1
1 937

"jamie" <ja*******@yahoo.comwrote in message
news:81**********************************@m44g2000 hsc.googlegroups.com...
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

Jul 18 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.