Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Show a bitmap for a menu item

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensions.Net
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Mon Jan 26, 2009 11:15 am    Post subject: HOWTO: Show a bitmap for a menu item

Use the following code in the GetMenuItems method to show a bitmap for a menu item :

Code:
[C#]
public override void GetMenuItems(GetMenuitemsEventArgs e)
{
 ShellMenuItem menuitem  =  e.Menu.AddItem("Context menu  Item", "contextmenuitem", string.Empty);
 
  //Set the path to your .bmp file here
  menuitem.SetBitmap(new Bitmap("c:\\mybitmap.bmp"));           
}


Code:
[vb.Net]
Public Overrides Sub GetMenuItems(ByVal e As GetMenuitemsEventArgs)

  Dim menuitem As ShellMenuItem = e.Menu.AddItem("Context menu  Item", "contextmenuitem", String.Empty)
 
  'Set the path to your .bmp file here
  menuitem.SetBitmap(New Bitmap("c:\mybitmap.bmp"))

End Sub
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensions.Net All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group