Maintain a Theme for a project

Post new topic   Reply to topic

View previous topic View next topic Go down

Maintain a Theme for a project

Post by thava on Mon Oct 06, 2008 6:28 pm

here i have submited a code snippet this snippet will use those who want to maintain a theme for their projects in vb6
prerequisties
add a module and copy this code
Code:

public sub SetThemeTo(ByVal Frm as Form)
Dim Cont as control
For Each cont in Frm.Controls
      If TypeOf Cont is TextBox then
        Cont.BackColor = VbRed
        'you can also change your font Property
      Elseif TypeOf Cont is  Label then
        cont.BackColor  = vbCyan
        'you can also change your font Property
      End If
' in the same manor you can sel for all your controls backcolor, forecolor, font
'thus you can maintain a theme for all over the project
Next
End Sub

call the sub in any form load method like this
Code:

SetThemeTo me

thava

Posts: 3
Join date: 2008-10-04
Age: 27
Location: Madurai,Tamilnadu, india

View user profile

Back to top Go down

Re: Maintain a Theme for a project

Post by Akhilesh B Chandran on Mon Oct 06, 2008 7:40 pm

Wow ! That's a nice technique and good thinking pal... Smile Keep it up Smile

Akhilesh B Chandran
Administrator
Administrator

Posts: 26
Join date: 2008-09-29
Age: 19
Location: Trivandrum, Kerala, India

View user profile http://askq.forumotion.net

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You can reply to topics in this forum