looping through buttons in toolbar

Posted on 2006-04-12
Last Modified: 2006-11-18
Hello experts whats the best way to loop through buttons in a toolbar.  Could some one explain using a for each loop? Below I am using a for loop with an integer it works, but I would like to know how using a for each.

  For x As Integer = 0 To ToolBar1.Buttons.Count - 1
                    ToolBar1.Buttons(x).Enabled = True
Question by:tentavarious
    1 Comment
    LVL 17

    Accepted Solution

    For Each x As ToolBarButton In ToolBar1.Buttons
                x.Enabled = True

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 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

    19 Experts available now in Live!

    Get 1:1 Help Now