Solved

images into each ToolStripMenuItem

Posted on 2008-06-18
3
341 Views
Last Modified: 2008-07-27
I need to add two images into each ToolStripMenuItem
0
Comment
Question by:tetoo
3 Comments
 
LVL 19

Accepted Solution

by:
Stephen Manderson earned 500 total points
Comment Utility
As it stands you cant add 2 images to a ToolStripMenuItem

You can only assign one image at any one time, you could however change the image depending on user actions such as setting the image property to an image list with your 2 images. and could then use the mouse over and mouse up (Or any other properties for that matter) and change the image depending on the state.

Heres an example. Add an imagelist to your form and have your 2 images.

Regards
Steve
    Private Sub ToolStripButton1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ToolStripButton1.MouseDown

        'You could have the image change when the mouse is over the menu item

        ToolStripButton1.Image = ImageList1.Images.Item(0)

    End Sub
 

    Private Sub ToolStripButton1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ToolStripButton1.MouseUp

        'You could then have it change back again to the second image

        ToolStripButton1.Image = ImageList1.Images.Item(1)

    End Sub

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now