Tuesday, March 24, 2009

Design patterns

I've received an order from my boss to present design patterns to other team members, since this topic is not well known within the firm. As I went looking for something to begin with i came across the book called: Head First - Design patterns . It's a great book and i am using it as a guide on how to present patterns subject in a human understandable way.

Tuesday, March 10, 2009

How to change the backgroud color of MDI windows

Code below:
For Each ctrl As Control In Controls
        If ctrl.GetType() IsNot GetType(MdiClient) Then
          Continue For
        End If

        Dim colorName As String = ConfigurationManager.AppSettings("Dialog.BackColor")
        If colorName Is Nothing Then
          Exit For
        End If

        Dim color As Color = color.FromName(colorName)
        'checks if color is transparent, mdiclient.backcolor doesn't support transparent colors
        If color.A <> 0 Then
          ctrl.BackColor = color.FromName(colorName)
        End If
next