Control colors effecting application load time

  • Thread starter Thread starter jcrouse
  • Start date Start date
J

jcrouse

Many of you who may respond to this are somewhat familiar with my app in
process (Cor). Simply, it's a form with 30 labels that is triggered from
another application, with a hotkey. The labels text is filled in by parsing
a file for certain information. There is a form designer that allows the
user to set many label properties of the displayed form, two of which are
Label.Forecolor and Label.Backcolor. I want to try and make the form display
to the screen a little faster. If the fore and back colors are set to
System/Control Text and System/Control in the properties box and left as
that then the form displays very quickly. However, if the colors are changed
in the form designer to something different then the form displays much
slower. It's like it is painting the colors or something. Can someone
explain what is happening here and also how I might speed it up a little.



Thanks,

John
 
Well, I have two variants of the application. The one with the form designer
sets the colors at runtime in the form load. The one that is hard coded has
them set in design mode. I'm not aware of how to disable updating of the
screen. How is this accomplished?

Thanks,
John
 
I never heard of that either.

The designer does some magic where it calls SuspendLayout() before settings
properties and then ResumeLayout(False) when done. But that doesn't turn off
the updating of the screen, just positioning events(?). Some controls
(ListBox, ListView) have a BeginUpdate and EndUpdate methods. But not the
form itself, AFAIK.

Greg
 
afaik, i already done in vb6 similar to mirc chat using colour for
back and foreground.. but it big codes as u wanted 30 labels. what i did
i added combo and listbox both r invisible at runtime(user can't see
controls) similar mirc or pirch chat(i preferred Pirch chat). the
listbox is used to save color to ini and when form is loaded u will get
same colour as u setting previously, but u still get at same time
without saving. when u clciked label it will stored value in listbox
also will activate selectedindex from combo(u do nothing in combo) and
in combo u write all 30 label(x).name. that all i did. but i'm still
working on irc chat. i do have sample(irc chat), but can't work on XP.
regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top