Solved

images into each ToolStripMenuItem

Posted on 2008-06-18
3
343 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

896 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

15 Experts available now in Live!

Get 1:1 Help Now