?
Solved

images into each ToolStripMenuItem

Posted on 2008-06-18
3
Medium Priority
?
353 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

718 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