troubleshooting Question

Using the control's backcolor property

Avatar of bbanis2k
bbanis2k asked on
Visual Basic.NET
2 Comments1 Solution206 ViewsLast Modified:
What would I add to my code to use the control's backcolor property to change the control's background color to yellow?


  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
      Dim list As New ArrayList
      GetControls(Me, list)

      lstList.DataSource = list

   End Sub

   Private Sub GetControls(ByVal collection As Control, ByVal list As ArrayList)
      Dim control As Control
      For Each control In collection.Controls
         list.Add(control.Name)

         If (collection.Controls.Count > 0) Then
            GetControls(control, list)

         End If
      Next
   End Sub

End Class ' FrmControlsCollection
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros