﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Slow screen painting</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 10 Sep 2026 00:00:43 GMT</lastBuildDate><ttl>20</ttl><item><title>Slow screen painting</title><link>http://forum.strataframe.net/FindPost14246.aspx</link><description>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.&amp;nbsp; When displayed it paints (almost scrolls) from the bottom up. When a childdialog is popped up&amp;nbsp;over this screen and then closed, the underlying portion of the screen that needs to be "repainted" is very slow.&amp;nbsp; Again, repainting from bottom to top.&lt;/P&gt;&lt;P&gt;Any ideas as to why or how to speed up the&amp;nbsp;screen painting?&amp;nbsp; All controls that have a ThemeSupport property are set to&amp;nbsp;Full.</description><pubDate>Sun, 10 Feb 2008 20:13:05 GMT</pubDate><dc:creator>fansanitis</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14264.aspx</link><description>No problem. :)</description><pubDate>Sun, 10 Feb 2008 20:13:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14260.aspx</link><description>Thanks for the prompt resolution Trent.</description><pubDate>Sun, 10 Feb 2008 17:38:06 GMT</pubDate><dc:creator>fansanitis</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14254.aspx</link><description>Frank,&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; This will help improve performance like the other controls.</description><pubDate>Sun, 10 Feb 2008 14:34:07 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14253.aspx</link><description>[quote]How do I make the ThemedContainer have a solid background? [/quote]&lt;/P&gt;&lt;P&gt;Well, at the moment, you don't.&amp;nbsp; I will have to add this to my "to-do" list as this control doesn't yet have that functionality.&amp;nbsp; Sorry.&amp;nbsp; :ermm:</description><pubDate>Sun, 10 Feb 2008 13:27:37 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14252.aspx</link><description>I changed my ThemedGroupBoxes and ThemedPanel to render with a solid background but I several ThemedContainer controls which contain ThemedGroupBox controls.&amp;nbsp; I don't see any properties to render the ThemedContainer with a solid background or turn off gradient rendering.&amp;nbsp; Right now I have gradient ThemedContainers and a ThemePanel and ThemedGroupBoxex that have a solid background.&amp;nbsp; Not to attrative.&amp;nbsp; &lt;/P&gt;&lt;P&gt;How do I make the ThemedContainer have a solid background?</description><pubDate>Sun, 10 Feb 2008 13:11:36 GMT</pubDate><dc:creator>fansanitis</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14250.aspx</link><description>Thanks Trent but the project was created for VS2008.&amp;nbsp; I'm using VS2005.&amp;nbsp; Can you "downgrade" it?</description><pubDate>Sun, 10 Feb 2008 12:32:35 GMT</pubDate><dc:creator>fansanitis</dc:creator></item><item><title>RE: Slow screen painting</title><link>http://forum.strataframe.net/FindPost14247.aspx</link><description>[quote]Any ideas as to why or how to speed up the&amp;nbsp;screen painting?&amp;nbsp; All controls that have a ThemeSupport property are set to&amp;nbsp;Full.[/quote]&lt;P&gt;Welcome to the age old problem of WinForms :)&amp;nbsp; Actually there are a number of things that you can do.&amp;nbsp; 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).&amp;nbsp; The reason things tend to render slow is transparency...which by default, all of the themed controls such as the ThemedGroupBox support this transparency.&amp;nbsp; 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.&amp;nbsp; So on a ThemedGroupBox, set the TransparentBackground property to False and the FillBody to False as well (the FillBody&amp;nbsp;is not related to transparency, however, it can improve rendering for controls that are dropped on this container).&lt;/P&gt;&lt;P&gt;I have created a quick sample here to show how to set the ThemedPanel and the ThemedGroupBox properties.&amp;nbsp; This is what we do in our medical software (along with some offscreen rendering) to improve performance on these large forms.&amp;nbsp; However, using solid backgrounds and preventing transparency make the biggest difference.&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;[codesnippet]MicroFour.StrataFrame.Tools.LockScreen.Lock(Me.Handle)[/codesnippet]&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;[codesnippet]MicroFour.StrataFrame.Tools.LockScreen.Unlock()[/codesnippet]</description><pubDate>Sun, 10 Feb 2008 11:19:59 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>