Slow screen painting


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No problem. Smile
fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
Thanks for the prompt resolution Trent.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Frank,

I was already having to work on that control so I added two properties to it that will be included in the next build: TransparentBackground and RenderBodyAsSolidColor.  This will help improve performance like the other controls.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
How do I make the ThemedContainer have a solid background?

Well, at the moment, you don't.  I will have to add this to my "to-do" list as this control doesn't yet have that functionality.  Sorry.  Ermm

fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
I changed my ThemedGroupBoxes and ThemedPanel to render with a solid background but I several ThemedContainer controls which contain ThemedGroupBox controls.  I don't see any properties to render the ThemedContainer with a solid background or turn off gradient rendering.  Right now I have gradient ThemedContainers and a ThemePanel and ThemedGroupBoxex that have a solid background.  Not to attrative. 

How do I make the ThemedContainer have a solid background?

fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
Thanks Trent but the project was created for VS2008.  I'm using VS2005.  Can you "downgrade" it?
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Any ideas as to why or how to speed up the screen painting?  All controls that have a ThemeSupport property are set to Full.

Welcome to the age old problem of WinForms Smile  Actually there are a number of things that you can do.  First, in the 1.6.5 beta, all parent Themed Controls such as a ThemedContainer now have a property called RenderAsSolidBackground (or something along those lines depending on the control).  The reason things tend to render slow is transparency...which by default, all of the themed controls such as the ThemedGroupBox support this transparency.  The first thing that will increase performance is to prevent the reliance on transparency as this requires a re-render everytime each parent container redraws and there are MANY more rendering cycles that take place with transparency.  So on a ThemedGroupBox, set the TransparentBackground property to False and the FillBody to False as well (the FillBody is not related to transparency, however, it can improve rendering for controls that are dropped on this container).

I have created a quick sample here to show how to set the ThemedPanel and the ThemedGroupBox properties.  This is what we do in our medical software (along with some offscreen rendering) to improve performance on these large forms.  However, using solid backgrounds and preventing transparency make the biggest difference.

You can also lock handles in certain conditions as well...however, this requires more hand coding and should only be used on the worst of scenarios:

MicroFour.StrataFrame.Tools.LockScreen.Lock(Me.Handle)

and

MicroFour.StrataFrame.Tools.LockScreen.Unlock()

Attachments
SolidBackgrounds.zip (96 views, 67.00 KB)
fansanitis
fansanitis
StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)StrataFrame Novice (53 reputation)
Group: Forum Members
Posts: 45, Visits: 103
I have a very busy data entry form that uses a number of themed controls (e.g. panel, container, toolstrip, etc.) that "paints" very slowly.  When displayed it paints (almost scrolls) from the bottom up. When a childdialog is popped up over this screen and then closed, the underlying portion of the screen that needs to be "repainted" is very slow.  Again, repainting from bottom to top.

Any ideas as to why or how to speed up the screen painting?  All controls that have a ThemeSupport property are set to Full.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search