Is there a way to apply any changes made to an entire application and not just the open (active) form that you are in? I.E. I change the backcolor to a color from a color dialog. I want that chosen color to be applied to all the forms' backcolor in my project. Can this also then be applied to all the other controls' backcolor? The code that I posted works but all forms and controls have to have the changes applied to each one separately.

Dim mycol
        Dim mycol2
        cdlg.ShowDialog()

        mycol = cdlg.Color


        mycol2 = Color.FromArgb(mycol.A, _
        (mycol.R * 0.8), (mycol.G * 0.8), (mycol.B * 0.8))
        ListBox1.ForeColor = Color.LemonChiffon

        ListBox1.Items.Add("Help me!")

        ListBox1.BackColor = mycol2
  [B]  ''THIS DOES NOT WORK BELOW[/B]
        For Each frm As Form In Application.OpenForms

            frm.BackColor = mycol
            frm.Invalidate() '' Causes a repaint of the form to make sure that the change goes through.

        Next
[B]''THIS DOES WORK[/B]
        Me.BackColor = mycol
        FontStylesAndSizes.BackColor = mycol
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.