Solved

How to iterating  through a visual net 2005 toolstrip

Posted on 2009-03-29
2
220 Views
Last Modified: 2013-12-26
Greetings,

First I need to iterate through the controls in a toolstrip.  Second, when the control is a combobox, I need to read the value.  

Thanks
0
Comment
Question by:vaughnwhitehead
2 Comments
 
LVL 3

Accepted Solution

by:
TommyTwoPints earned 500 total points
ID: 24014350
Hello vaughnwhitehead,

The below sample will help you achieve what you want.

Regards,

TommyTwoPints
    Sub LoopThroughToolStrip()
        Dim TS As ToolStrip = Me.ToolStrip1
        For Each item As ToolStripItem In TS.Items
            If TypeOf item Is ToolStripComboBox Then
                MessageBox.Show(DirectCast(item, ToolStripComboBox).Text)
            End If
        Next
    End Sub

Open in new window

0
 

Author Closing Comment

by:vaughnwhitehead
ID: 31564093
Greatly appreciate the fast response on such a basic question.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

760 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

23 Experts available now in Live!

Get 1:1 Help Now