473,320 Members | 1,902 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,320 software developers and data experts.

Controls are slow to paint

I am developing a mdi application that will act as a front end to a database.

I am finding that when i show any of the mdi child forms in my application
it is noticeable that the form is shown first with the areas where the
controls will be displayed cut out and what ever is top most before the form
is shown is momentarity seen through these areas.

This is also noticed if the user changes focus to say internet explorer and
then back to the running application.

I find that this is more noticeable for textboxes, labels and toolstrips but
not listboxes or tab controls.

I have tried various methods suggested for double buffering, however these
appear to show no signs of improvement.

None of my mdi child forms are currently doing anything special on loading -
the form as seen in the form designer is just being shown (no data access on
load)

I would appreciate any suggestions.
Jan 7 '06 #1
6 1954
Are you using any third-party components? We've had some issues with
third-party components causing issues.

One thing I did find made form display a little quicker was rather than
writing code into the form_load event, I use the form_onload. I have seen
noticeably quicker paints.

HTH.

-Eric
"Jrsmith" wrote:
I am developing a mdi application that will act as a front end to a database.

I am finding that when i show any of the mdi child forms in my application
it is noticeable that the form is shown first with the areas where the
controls will be displayed cut out and what ever is top most before the form
is shown is momentarity seen through these areas.

This is also noticed if the user changes focus to say internet explorer and
then back to the running application.

I find that this is more noticeable for textboxes, labels and toolstrips but
not listboxes or tab controls.

I have tried various methods suggested for double buffering, however these
appear to show no signs of improvement.

None of my mdi child forms are currently doing anything special on loading -
the form as seen in the form designer is just being shown (no data access on
load)

I would appreciate any suggestions.

Jan 7 '06 #2
Thanks for your feedback Eric.

I'm not using any third party components in this application yet.

I find that this problem exists even on an about form that i have. I am
intialising the labels on that form after the InitializeComponent() call in
the constructor.

I find that even if i take out all of my initialisation code on this form,
this takes out all of my code for this particular form, I see no improvement
in the problem even though all the form is doing is loading what i have
designed in the windows form designer.

I mention just the about form above but this problem is present in all mdi
child forms in the application.

Should I expect applications created in the .net framework to paint forms
piecemeal in this way? It's a while since I have used VB6 but i don't
remember this problem with it.

Jonathan

"Eric Giles" wrote:
Are you using any third-party components? We've had some issues with
third-party components causing issues.

One thing I did find made form display a little quicker was rather than
writing code into the form_load event, I use the form_onload. I have seen
noticeably quicker paints.

HTH.

-Eric
"Jrsmith" wrote:
I am developing a mdi application that will act as a front end to a database.

I am finding that when i show any of the mdi child forms in my application
it is noticeable that the form is shown first with the areas where the
controls will be displayed cut out and what ever is top most before the form
is shown is momentarity seen through these areas.

This is also noticed if the user changes focus to say internet explorer and
then back to the running application.

I find that this is more noticeable for textboxes, labels and toolstrips but
not listboxes or tab controls.

I have tried various methods suggested for double buffering, however these
appear to show no signs of improvement.

None of my mdi child forms are currently doing anything special on loading -
the form as seen in the form designer is just being shown (no data access on
load)

I would appreciate any suggestions.

Jan 7 '06 #3
I wouldn't expect this type of problem at all. I've written many .NET
applications that are based on the MDI model and I have never had any real
issues. The reason I mentioned the third-party controls is that we have some
forms with very complex grids and docking schemes that were a bit of a
problem however even they perform well now.

What are the specs for the development machine you're using. Are you
noticing any limiting factors like CPU or Memory?

Is this slowness still apparent if you show the form with no MDIParent set?
Is it only apparent for the first instance of the form or for every single
form being shown?

-Eric

"Jrsmith" wrote:
Thanks for your feedback Eric.

I'm not using any third party components in this application yet.

I find that this problem exists even on an about form that i have. I am
intialising the labels on that form after the InitializeComponent() call in
the constructor.

I find that even if i take out all of my initialisation code on this form,
this takes out all of my code for this particular form, I see no improvement
in the problem even though all the form is doing is loading what i have
designed in the windows form designer.

I mention just the about form above but this problem is present in all mdi
child forms in the application.

Should I expect applications created in the .net framework to paint forms
piecemeal in this way? It's a while since I have used VB6 but i don't
remember this problem with it.

Jonathan

"Eric Giles" wrote:
Are you using any third-party components? We've had some issues with
third-party components causing issues.

One thing I did find made form display a little quicker was rather than
writing code into the form_load event, I use the form_onload. I have seen
noticeably quicker paints.

HTH.

-Eric
"Jrsmith" wrote:
I am developing a mdi application that will act as a front end to a database.

I am finding that when i show any of the mdi child forms in my application
it is noticeable that the form is shown first with the areas where the
controls will be displayed cut out and what ever is top most before the form
is shown is momentarity seen through these areas.

This is also noticed if the user changes focus to say internet explorer and
then back to the running application.

I find that this is more noticeable for textboxes, labels and toolstrips but
not listboxes or tab controls.

I have tried various methods suggested for double buffering, however these
appear to show no signs of improvement.

None of my mdi child forms are currently doing anything special on loading -
the form as seen in the form designer is just being shown (no data access on
load)

I would appreciate any suggestions.

Jan 7 '06 #4
My development machine has a 2.7Ghz Processor and 512Mb RAM. I am not
noticing any adverse affects on other applications.

I have run some tests and find that the slowness is as apparent if the form
if it is hidden and then that same instance is subsequntly shown again, as it
is when a new instance is created. It is slightly more noticeable when the
form is first shown.

The main child forms used in my app have many pairs of textboxes and labels,
however i find that the slowness is just as apprent on the about form which
has relatively few controls - so I am assuming that this problem is not
related to the number of controls on the form.

It appears to be more apparent in mdi child forms, and i assume this is
because there are 'holes' where the controls should be and therefore you
momentarily see the dark grey of the parent form. Do you find that this is at
all noticeable in your apps? - I just wonder if I am being too sensitive
regarding this - do you notice this behaviour at all in your apps or do the
child forms appear at once with no noticeable drawing of controls?

Regards

Jonathan

"Eric Giles" wrote:
I wouldn't expect this type of problem at all. I've written many .NET
applications that are based on the MDI model and I have never had any real
issues. The reason I mentioned the third-party controls is that we have some
forms with very complex grids and docking schemes that were a bit of a
problem however even they perform well now.

What are the specs for the development machine you're using. Are you
noticing any limiting factors like CPU or Memory?

Is this slowness still apparent if you show the form with no MDIParent set?
Is it only apparent for the first instance of the form or for every single
form being shown?

-Eric

"Jrsmith" wrote:
Thanks for your feedback Eric.

I'm not using any third party components in this application yet.

I find that this problem exists even on an about form that i have. I am
intialising the labels on that form after the InitializeComponent() call in
the constructor.

I find that even if i take out all of my initialisation code on this form,
this takes out all of my code for this particular form, I see no improvement
in the problem even though all the form is doing is loading what i have
designed in the windows form designer.

I mention just the about form above but this problem is present in all mdi
child forms in the application.

Should I expect applications created in the .net framework to paint forms
piecemeal in this way? It's a while since I have used VB6 but i don't
remember this problem with it.

Jonathan

"Eric Giles" wrote:
Are you using any third-party components? We've had some issues with
third-party components causing issues.

One thing I did find made form display a little quicker was rather than
writing code into the form_load event, I use the form_onload. I have seen
noticeably quicker paints.

HTH.

-Eric
"Jrsmith" wrote:

> I am developing a mdi application that will act as a front end to a database.
>
> I am finding that when i show any of the mdi child forms in my application
> it is noticeable that the form is shown first with the areas where the
> controls will be displayed cut out and what ever is top most before the form
> is shown is momentarity seen through these areas.
>
> This is also noticed if the user changes focus to say internet explorer and
> then back to the running application.
>
> I find that this is more noticeable for textboxes, labels and toolstrips but
> not listboxes or tab controls.
>
> I have tried various methods suggested for double buffering, however these
> appear to show no signs of improvement.
>
> None of my mdi child forms are currently doing anything special on loading -
> the form as seen in the form designer is just being shown (no data access on
> load)
>
> I would appreciate any suggestions.

Jan 7 '06 #5
I have been experiencing the exact same thing you are and for the past two
years have yet to find anyone to tell me why. Here's a work-around however.
Put Me.Refresh in the form.activated of your mdiChild form. It's like night
and day.
Jrsmith wrote:
I am developing a mdi application that will act as a front end to a database.

I am finding that when i show any of the mdi child forms in my application
it is noticeable that the form is shown first with the areas where the
controls will be displayed cut out and what ever is top most before the form
is shown is momentarity seen through these areas.

This is also noticed if the user changes focus to say internet explorer and
then back to the running application.

I find that this is more noticeable for textboxes, labels and toolstrips but
not listboxes or tab controls.

I have tried various methods suggested for double buffering, however these
appear to show no signs of improvement.

None of my mdi child forms are currently doing anything special on loading -
the form as seen in the form designer is just being shown (no data access on
load)

I would appreciate any suggestions.


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...neral/200601/1
Jan 9 '06 #6
Honestly, I have not noticed anything like the problem you're experiencing.
It is going to be difficult to diagnose as I have a number of programmers
working for me and I have not seen this type of slowness on any of the
machines we use. We generally do not provide our developers with machines
with less that 1GB Ram however you would expect to see issues across the
board if this were the problem.

What version of the .NET framework are you using? Have you had any other
versions installed on the machine previously?

-Eric
"Jrsmith" wrote:
My development machine has a 2.7Ghz Processor and 512Mb RAM. I am not
noticing any adverse affects on other applications.

I have run some tests and find that the slowness is as apparent if the form
if it is hidden and then that same instance is subsequntly shown again, as it
is when a new instance is created. It is slightly more noticeable when the
form is first shown.

The main child forms used in my app have many pairs of textboxes and labels,
however i find that the slowness is just as apprent on the about form which
has relatively few controls - so I am assuming that this problem is not
related to the number of controls on the form.

It appears to be more apparent in mdi child forms, and i assume this is
because there are 'holes' where the controls should be and therefore you
momentarily see the dark grey of the parent form. Do you find that this is at
all noticeable in your apps? - I just wonder if I am being too sensitive
regarding this - do you notice this behaviour at all in your apps or do the
child forms appear at once with no noticeable drawing of controls?

Regards

Jonathan

"Eric Giles" wrote:
I wouldn't expect this type of problem at all. I've written many .NET
applications that are based on the MDI model and I have never had any real
issues. The reason I mentioned the third-party controls is that we have some
forms with very complex grids and docking schemes that were a bit of a
problem however even they perform well now.

What are the specs for the development machine you're using. Are you
noticing any limiting factors like CPU or Memory?

Is this slowness still apparent if you show the form with no MDIParent set?
Is it only apparent for the first instance of the form or for every single
form being shown?

-Eric

"Jrsmith" wrote:
Thanks for your feedback Eric.

I'm not using any third party components in this application yet.

I find that this problem exists even on an about form that i have. I am
intialising the labels on that form after the InitializeComponent() call in
the constructor.

I find that even if i take out all of my initialisation code on this form,
this takes out all of my code for this particular form, I see no improvement
in the problem even though all the form is doing is loading what i have
designed in the windows form designer.

I mention just the about form above but this problem is present in all mdi
child forms in the application.

Should I expect applications created in the .net framework to paint forms
piecemeal in this way? It's a while since I have used VB6 but i don't
remember this problem with it.

Jonathan

"Eric Giles" wrote:

> Are you using any third-party components? We've had some issues with
> third-party components causing issues.
>
> One thing I did find made form display a little quicker was rather than
> writing code into the form_load event, I use the form_onload. I have seen
> noticeably quicker paints.
>
> HTH.
>
> -Eric
>
>
> "Jrsmith" wrote:
>
> > I am developing a mdi application that will act as a front end to a database.
> >
> > I am finding that when i show any of the mdi child forms in my application
> > it is noticeable that the form is shown first with the areas where the
> > controls will be displayed cut out and what ever is top most before the form
> > is shown is momentarity seen through these areas.
> >
> > This is also noticed if the user changes focus to say internet explorer and
> > then back to the running application.
> >
> > I find that this is more noticeable for textboxes, labels and toolstrips but
> > not listboxes or tab controls.
> >
> > I have tried various methods suggested for double buffering, however these
> > appear to show no signs of improvement.
> >
> > None of my mdi child forms are currently doing anything special on loading -
> > the form as seen in the form designer is just being shown (no data access on
> > load)
> >
> > I would appreciate any suggestions.

Jan 10 '06 #7

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

Similar topics

5
by: Alien | last post by:
I have a hex editor-type class that extends UserControl and paints its data to a PictureBox. Basically the problem is that repainting it takes usually between 60 and 80ms, which may seem pretty...
1
by: Amy | last post by:
What's different between Controls method Refresh() and Invalidate(), Refresh() and Update()? Your help will be appreciated. Thanks.
4
by: Dan Baker | last post by:
I have a form with several controls. I would like to paint *over* several controls (mainly GroupBoxes and Labels). But, Everywhere I try to perform painting, I end up "behind" the controls. I need...
2
by: conset23 | last post by:
Hello. I'm working with WinForm. It has 30 same user control, each with 4 buttons, 3 labels, 3 textboxes, 2 picture boxes and uses override onPaint to draw gradient rectangle. Main form also has 2...
4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
1
by: FredC | last post by:
I'm using VS 2003, C#.Net 2003. I built a simple windows form app. with the following attributes: - has a BackgroundImage set to a jpeg I built a very simple user control that contains a...
4
by: CodeLeon | last post by:
I am designing an enhanced GUI suite, and i need to know how to: * Make a user control a "helper" control, ie, one that sits at the bottom (like timer or process) * Make this control modify the...
1
by: =?Utf-8?B?U3RldmUgUmFuZGFsbA==?= | last post by:
I have a form with a number of panel controls on it. I have overriden the paint event (of the panel controls) to provide custom painting. What I have done is to use the Paint event to paint the...
3
by: Brandon Arnold | last post by:
I have a panel that contains a label and a picturebox. When clicked, I want to draw a rectangle over everything. I can draw the rect and set the color, no big deal. The problem is because I have to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.