Loading Images Into a Right Click Menu

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jamie

    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(sImageFor m).Form: Set imgList =
    frmImage.frmIma geList.Object
    hMenuImg = imgList.ListIma ges.Item(mMenu. sImage(iMenuInd ex)).Picture
    iCopyDC = CreateCompatibl eDC(0)
    iRet = StretchBlt(iCop yDC, 0, 0, 12, 12, hMenuImg, 0, 0, 22, 22,
    SRCCOPY)
    Call SetMenuItemBitm aps(iCopyDC, 1, MF_BYPOSITION, hMenuImg, hMenuImg)

    ******


    Thanks,

    Jamie
  • Lloyd Sheen

    #2
    Re: Loading Images Into a Right Click Menu


    "jamie" <jamiedora@yaho o.comwrote in message
    news:81884b6b-414d-432b-ab0f-4a1406640a3a@m4 4g2000hsc.googl egroups.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(sImageFor m).Form: Set imgList =
    frmImage.frmIma geList.Object
    hMenuImg = imgList.ListIma ges.Item(mMenu. sImage(iMenuInd ex)).Picture
    iCopyDC = CreateCompatibl eDC(0)
    iRet = StretchBlt(iCop yDC, 0, 0, 12, 12, hMenuImg, 0, 0, 22, 22,
    SRCCOPY)
    Call SetMenuItemBitm aps(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

    Comment

    Working...