Hi..

I am trying to change the button colors, in different group boxes,(Buttons and group boxes are in the same form). How can I change it?

Hi,

You can try something like this:

For Each cnt As Control In Me.Controls
            If TypeOf cnt Is GroupBox Then
                For Each child In cnt.Controls
                    If TypeOf child Is Button Then
                        CType(child, Button).BackColor = Color.Red
                    End If
                Next
            End If
        Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.