Page 1 of 1

[Solved] PB 5.60 Bug? #PBAny not possible in ImageID

Posted: Thu Jul 20, 2017 12:26 pm
by Klonk
Hi,

can you tell me what I'm doing wrong? Or is it a bug?

This code works:

Code: Select all

If CreatePopupImageMenu(#TrayMenu,#PB_Menu_ModernLook)
      MenuItem(3, "Set Applications", CatchImage(2, ?Prefs))
      MenuItem(2, "Help/About", CatchImage(1, ?Help))
      MenuBar()
      MenuItem(1,"Exit", CatchImage(0, ?Exit))
      SetMenuItemState(#TrayMenu,5,1)
    EndIf
This one doesn't (well the images are not shown in the menu...):

Code: Select all

If CreatePopupImageMenu(#TrayMenu,#PB_Menu_ModernLook)
      MenuItem(3, "Set Applications", CatchImage(#PB_Any, ?Prefs))
      MenuItem(2, "Help/About", CatchImage(#PB_Any, ?Help))
      MenuBar()
      MenuItem(1,"Exit", CatchImage(#PB_Any, ?Exit))
      SetMenuItemState(#TrayMenu,5,1)
    EndIf

Re: PB 5.60 Bug? #PBAny not possible in ImageID (Catchimage)

Posted: Thu Jul 20, 2017 12:33 pm
by nco2k

Code: Select all

MyImage = CatchImage(#PB_Any, ?Prefs)
MenuItem(3, "Set Applications", ImageID(MyImage))
c ya,
nco2k

Re: PB 5.60 Bug? #PBAny not possible in ImageID (Catchimage)

Posted: Thu Jul 20, 2017 12:33 pm
by ts-soft

Code: Select all

If CreatePopupImageMenu(#TrayMenu,#PB_Menu_ModernLook)
  MenuItem(3, "Set Applications", ImageID(CatchImage(#PB_Any, ?Prefs)))
  MenuItem(2, "Help/About", ImageID(CatchImage(#PB_Any, ?Help)))
  MenuBar()
  MenuItem(1,"Exit", ImageID(CatchImage(#PB_Any, ?Exit)))
  SetMenuItemState(#TrayMenu,5,1)
EndIf 

Re: PB 5.60 Bug? #PBAny not possible in ImageID (Catchimage)

Posted: Thu Jul 20, 2017 12:43 pm
by Klonk
Aah, now I see my mistake.

Many thanks to everyone.