Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Changing Colors At Runtime.

Hi,

I am having 100 odd forms in my application and there are average 25 controls like textbox,
labels, Picture control etc. on each form.

I want to implement color themes in my application. i.e. the user will choose the theme he would
like to work from the Options Menu and based on his preference I want to change the backcolor
and forecolor properties of each form when the form is loaded.

My questions are:
1. Will it slow down the form loading process if I change the color of each control on form load?
2. Is there another better way of doing stuff like this?

Thanks.

Comments

  • EffahidEffahid Member Posts: 15
    HI , i am Effahid ( A Newcomer to the Club , but not to VB) ...
    The answer is simple , how is the user going to change the theme? obviosuly AFTER running the application ? Right? Now suppose the application is currently running and he chooses another theme in the theme dialong box(say) , you can display a form which says "Please Wait While The Theme is Applied" ..... Changing colors won't take TOO much long .So the user can wait for a couple of seconds....
    A TIP ABOUT CHANGING THE COLOR OF CONTROLS:
    To change the back color of all the text boxes in the form ,use a loop like this
    dim txtbox as TextBox
    for each txtbox in Me.Controls
    txtbox.BackColor = VBRed
    Next
    Regards
    Effahid
    For questions you can also mail me at: effahid@yahoo.com
Sign In or Register to comment.