Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
Is there any possiblities for insert images in a MenuStrip?
Posted
Updated 3-Oct-10 22:58pm
v2

1 solution

You should owner draw your menuitems.
In below code My.Resources.attach is the image in resources.
This will display just the image specified covering whole area of menuitem.

VB
Private Sub ToolStripMenuItem1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles ToolStripMenuItem1.Paint
  DirectCast(sender, ToolStripMenuItem).DisplayStyle = ToolStripItemDisplayStyle.None
  e.Graphics.DrawImage(My.Resources.attach, 0, 0, e.ClipRectangle.Width, e.ClipRectangle.Height)
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900