Hey,
I just tried to port over a ContextMenuStrip for a NotifyIcon I have in my app to using a plain ContextMenu with VistaMenu. The NotifyIcon isn't initialised on a form, in fact, my app doesn't show any forms until it needs to. I just directly wrote "NotifyIcon foo = new NotifyIcon()" in a class of mine. I'm trying to use the icon setting like so:
private static VistaMenu _vistaMenu = new VistaMenu(); private static void SetImage(this MenuItem menuItem, Image image) { _vistaMenu.SetImage(menuItem, image); }
menuItem.SetImage(bar);
While my menu appears to work fine, the icons don't get set.
I put breakpoints in VistaMenu.cs, and noticed that "formHasBeenIntialized" was false when I was trying to set the icons on my menu items.
Do I need to be more specific, or is there a solution?
Thanks!