Solved

images into each ToolStripMenuItem

Posted on 2008-06-18
3
351 Views
Last Modified: 2008-07-27
I need to add two images into each ToolStripMenuItem
0
Comment
Question by:tetoo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

by:
Stephen Manderson earned 500 total points
ID: 21818022
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

628 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