Something like this:-
That function would work on forms, usercontrols and controls. If you plan on putting a function like that into a module or any class that is not a container you could do it like this:-vb Code:
Private Sub ChangeFont(ByVal F As Font) For Each C As Control In Me.Controls C.Font = F Next End Sub
ContainerCtl would be the object where all the objects who's fonts you wish to change are situated.vb Code:
Private Sub ChangeFont(ByVal ContainerCtl As Control, ByVal F As Font) For Each C As Control In ContainerCtl.Controls C.Font = F Next End Sub




Reply With Quote
