473,382 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Control colors effecting application load time

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
Nov 21 '05 #1
5 1176
Are you setting the colors in Form_Load?

Did you try disabling Updating of the screen, when setting the properties?

Just my 2cs.

Regards,
Anand
http://www.dotnetindia.com

"jcrouse" wrote:
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

Nov 21 '05 #2
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

"Anand[MVP]" <An******@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
Are you setting the colors in Form_Load?

Did you try disabling Updating of the screen, when setting the properties?

Just my 2cs.

Regards,
Anand
http://www.dotnetindia.com

"jcrouse" wrote:
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

Nov 21 '05 #3
Well I have used LockWindowUpdate API. But I seem to remember there being a
BCL function that also did this. Sorry cant remember it exactly.

Rgds,
Anand
http://www.dotnetindia.com

"jcrouse" wrote:
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

"Anand[MVP]" <An******@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
Are you setting the colors in Form_Load?

Did you try disabling Updating of the screen, when setting the properties?

Just my 2cs.

Regards,
Anand
http://www.dotnetindia.com

"jcrouse" wrote:
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


Nov 21 '05 #4
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
"jcrouse" <me> wrote in message
news:u7**************@TK2MSFTNGP14.phx.gbl...
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

"Anand[MVP]" <An******@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
Are you setting the colors in Form_Load?

Did you try disabling Updating of the screen, when setting the
properties?

Just my 2cs.

Regards,
Anand
http://www.dotnetindia.com

"jcrouse" wrote:
> 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
>
>
>


Nov 21 '05 #5
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,

jcrouse wrote:
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


Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
4
by: Simon Harvey | last post by:
Hi all, Am I being really stupid here: myDropDown.SelectedIndex = 2 I think this line should set the dropdown control's selected item to 2. But nothing seems to be happening on the page....
0
by: Bryce Budd | last post by:
Hi, I have a webform which has several server controls attached. The entire form is data bound to custom objects. The collection objects are cached using the Cache object. In my use case, I...
9
by: TCORDON | last post by:
I have a user control that contains 2 image buttons, when you click one of them, both must change the image source, the thing is that the first time you click any one of them the page appears to do...
5
by: Norsoft | last post by:
I have a .Net 1.1 application which is downloaded into an aspx page. It is a dll which inherits from System.Windows.Forms.UserControl. It works fine on a PC with only the 1.1 Framework. However,...
2
by: Cliff Lane | last post by:
I have an application that allows the user to select fore and back ground colors for command buttons. I use the dialog to select the colors and store the value returned in the db as a string. For...
1
by: Dave | last post by:
Here's a question for you all. 1. I have in my application a control named CommonControl. CommonControl is inherited by a number of other controls in order to create semi-polymorphic controls. ...
5
by: Arpan | last post by:
In order to populate any server control with data dynamically, is it ALWAYS NECESSARY to either BIND the DataSource to that server control or call the DataBind method of that server control? For...
1
by: celoftis | last post by:
BACKGROUND: I have some PPT slides that have been converted to HTM (ensuring that the show slide animations while browsing checkbox is checked). The original HTM slides have custom animations to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.