﻿<?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?)  » Winform rendering pretty slow</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 07 Jun 2026 20:28:53 GMT</lastBuildDate><ttl>20</ttl><item><title>Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15556.aspx</link><description>Hi,&lt;P&gt;I am working on my first SF application, and testing outside the VS debugger, I noticed some slowness on the winforms when loading.&lt;/P&gt;&lt;P&gt;I prepared a small sample video so you can see what I mean.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.progytech.com/videos/SF_Sample.html"&gt;http://www.progytech.com/videos/SF_Sample.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please let me know if there is any settings I need to do in order to adjust this unwanted effect.&lt;/P&gt;&lt;P&gt;The computer where this is being test is running Vista 64bits with 8gb ram.</description><pubDate>Tue, 15 Apr 2008 15:47:32 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15655.aspx</link><description>Glad it helped you with your problem.&amp;nbsp; :)</description><pubDate>Tue, 15 Apr 2008 15:47:32 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15654.aspx</link><description>[quote][b]Trent L. Taylor (04/15/2008)[/b][hr]This at least gives you more control than just setting the IsMDIContainer proeprty to True and then you can start to create your application environment.[/quote]&lt;P&gt;Trent,&lt;/P&gt;&lt;P&gt;You certainly nailed the problem with this sample solution.&amp;nbsp; In no time I was able to replace the old code in my Main Form and now the rendering problem is virtually gone.&lt;/P&gt;&lt;P&gt;I took the liberty of adding some functionality to the LaunchForm method that will do the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Before creating a new form object, check through the _MDI form's collection for an existing instance.&lt;/LI&gt;&lt;LI&gt;If found then activate that instance and bring it to the front.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is the changed code:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' Common method for automatically launching a form and making it an MDI child.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' If the form exist in the _MDI collection then show it to the user instead.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' This functionality could be controlled by passing a 2nd parameter&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="FormType"&amp;gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; LaunchForm(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; FormType &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Type)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Establish Locals&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loForm &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; Form&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Create the form&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loForm = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(Activator.CreateInstance(FormType), Form)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;For&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Each&lt;/FONT&gt;&lt;FONT size=2&gt; currentForm &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; Form &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;In&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;._MDI.Controls&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; currentForm.Name = loForm.Name &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- If the form is minimized then restore it.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; currentForm.WindowState = FormWindowState.Minimized &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;currentForm.WindowState = FormWindowState.Normal&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Show the form on top of the others.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;currentForm.BringToFront()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Exit&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;Next&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Set the MDI parent&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loForm.MdiParent = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- Show the form&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;loForm.Show()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]</description><pubDate>Tue, 15 Apr 2008 15:41:39 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15644.aspx</link><description>Thanks Trent,&lt;/P&gt;&lt;P&gt;Will check your sample and implement in my current project.&amp;nbsp; Once again, your help is must appreciated.:P</description><pubDate>Tue, 15 Apr 2008 11:02:57 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15643.aspx</link><description>This is turning into somewhat of a lesson on windows, rendering, and handles....all things that are related to WinForms development versus StrataFrame itself.&amp;nbsp; We too ran into rendering issues in some of our applications...and we had to stop, figure out where the issues were, and work through them.&amp;nbsp; One of the primary issues that we ran into were MDI forms and the MDIClient class.&lt;/P&gt;&lt;P&gt;We wrote our own MDI environment for our medical application so that rendering would be faster.&amp;nbsp; However, one thing that is generally a bad idea is to just set the IsMDIContainer property to true...many issues come from doing this.&lt;/P&gt;&lt;P&gt;You are always better of creating an MDIClient class and then adding it to your form, which will in affect turn that form into an MDI.&amp;nbsp; I have attached a sample of how to do this.&amp;nbsp; You can then take this to the next level by adding form loading logic, etc, when it is added to the MDI.&amp;nbsp; You can render the back of the MDI client (in this sample I just set the background to white).&amp;nbsp; But there are a lot of things that you can do.&lt;/P&gt;&lt;P&gt;This at least gives you more control than just setting the IsMDIContainer proeprty to True and then you can start to create your application environment.</description><pubDate>Tue, 15 Apr 2008 10:42:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15640.aspx</link><description>Hi Trent,&lt;P&gt;Thanks again for the support.&lt;/P&gt;&lt;P&gt;I tried your code in the CRM and as you said, it worked as expected.:D&lt;/P&gt;&lt;P&gt;Now I put the code in the Maintenance Form as suggested in my project and what I am seeing is that the form will not render until it is moved by me using the mouse.&lt;/P&gt;&lt;P&gt;Please take a look at this small video sample that illustrate what I am experiencing: &lt;A href="http://www.progytech.com/videos/SF_Sample2/SF_Sample2.html"&gt;http://www.progytech.com/videos/SF_Sample2/SF_Sample2.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just to clarify:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The MDI MainForm is using the DevExpress Ribbon control (not the Ribbon form class).&lt;/LI&gt;&lt;LI&gt;The Maintenance Form is using SF controls including the modified ListView (SynchListView) posted by Greg McGuffey in this link &lt;A href="http://forum.strataframe.net/FindPost14966.aspx"&gt;http://forum.strataframe.net/FindPost14966.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description><pubDate>Tue, 15 Apr 2008 10:23:05 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15630.aspx</link><description>Edhy,&lt;/P&gt;&lt;P&gt;I reproduced your problem through an MDI environment identically to you video...so you must be placing the code in the wrong places or have something else that is overriding the locks.&lt;/P&gt;&lt;P&gt;[quote]Ok, I am not sure where to put this code, in the Main Form or in one of the maintenance forms?[/quote]&lt;/P&gt;&lt;P&gt;The maintenance form...&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;NOT&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; the main form!!!&lt;/P&gt;&lt;P&gt;[quote]Even thought I tried on both and the result was basically the same, the rendering is pretty slow.&lt;FONT size=1&gt;&lt;BR&gt;&lt;/FONT&gt;[/quote]&lt;/P&gt;&lt;P&gt;I took the CRM Sample Application and reproduced the problem, took the Customer Maintenance Form and added the code above, I also changed the Themed controls to not render transparents and render with solid backgrounds and all issues that you were talking about...to the "T" went away.</description><pubDate>Tue, 15 Apr 2008 09:39:33 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15620.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;Sorry I could not get back to you earlier, I was out today the whole day.&lt;/P&gt;&lt;P&gt;Ok, I am not sure where to put this code, in the Main Form or in one of the maintenance forms?&lt;/P&gt;&lt;P&gt;Even thought I tried on both and the result was basically the same, the rendering is pretty slow.</description><pubDate>Mon, 14 Apr 2008 21:19:15 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15600.aspx</link><description>Edhy,&lt;P&gt;I was testing something in the CRM sample and noticed a similar behavior to your video.&amp;nbsp; One thing that you can do to resolve this very easily is to lock the screen once a handle is created and then unlock it once it is shown:&lt;/P&gt;&lt;P&gt;[codesnippet]Protected Overrides Sub OnHandleCreated(ByVal e As System.EventArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.OnHandleCreated(e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MicroFour.StrataFrame.Tools.LockScreen.Lock(Me)&lt;BR&gt;End Sub[/codesnippet]&lt;/P&gt;&lt;P&gt;[codesnippet]Protected Overrides Sub OnShown(ByVal e As System.EventArgs)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.OnShown(e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MicroFour.StrataFrame.Tools.LockScreen.Unlock()&lt;BR&gt;End Sub[/codesnippet]&lt;P&gt;I will play with is some more later to see what events are being raised and what the MDI client is doing, but this should give you a quick fix.&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp; If you use this in conjunction with the non-transparent controls...it is instantanious!&amp;nbsp; No flicker at all!</description><pubDate>Mon, 14 Apr 2008 13:26:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15575.aspx</link><description>OK...a final, final thought :D&lt;P&gt;I am working from home today and on a really slow machine (I totally need to rebuild my home computer).&amp;nbsp; I am also talking to a remote data source in another town via a cable modem VPN.&amp;nbsp; On top of that, I just installed a new version of Camtasia and I didn't adjust anything and when I ran the app with Camtasia running and it slowed my machine WAY down.&amp;nbsp; But even with all of that, the screens loaded pretty quickly.&amp;nbsp; When running in a normal environment there is no lag or delay at all.&amp;nbsp; I just though you might want to see what I was talking about.&amp;nbsp; I have attached a video here running a very small portion of our medical application.&amp;nbsp; So you can see this coming from a large scale real-world application.</description><pubDate>Sat, 12 Apr 2008 13:42:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15574.aspx</link><description>One other thing I thought about that can improve performance is to preload your assemblies into the AppDoman.&amp;nbsp; This will improve the initial instantiation speed the first time.&amp;nbsp; An assembly reference won't be loaded into the AppDomain until it is first used.&amp;nbsp; So if you preload these it will speed up the performance the first time an assembly is used.&amp;nbsp; Just another idea.</description><pubDate>Sat, 12 Apr 2008 13:21:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15573.aspx</link><description>OK...I see a few things that I would probably tweak a little, but you kindof missed my point.&amp;nbsp; There is more going on than what you just showed me in that code.&amp;nbsp; &lt;P&gt;Let me put it to you in another way, I have a form that I have been working on recently that pulls from a very large data set from more than 10 different tables...there are over 200 controls on these pages once all added up.&amp;nbsp; I have the form popping up with virtually no lag or delay...using the SF controls.&amp;nbsp; So it can totally be done, I promise!&lt;/P&gt;&lt;P&gt;However, you have a lot of other factors also.&amp;nbsp; I noticed that you are using either Infragistics or DevExpress ribbon bar.&amp;nbsp; I also noticed that something in your dialog is moving the controls after their initial render.&amp;nbsp; So you are&amp;nbsp;fighting&amp;nbsp;more than a data load issue.&amp;nbsp; When your form comes up and moves 10 pixels to the left and up then something else is going on.&amp;nbsp; I know that at one point you were considering inheriting from the XtraForm.&amp;nbsp; Did you do that?&amp;nbsp; Do you have any handlers in your form?&amp;nbsp; There is more going on than what you showed me.&amp;nbsp; Just changing the data load alone will more than likely not resolve your issue.&amp;nbsp; I would first figure out why your dialog is re-rendering at least twice on instantiation and then moving.&amp;nbsp; All of these things need to be figured out&amp;nbsp;as well.&amp;nbsp; &lt;/P&gt;&lt;P&gt;You are right in that you are dealing with a simple form...but clearly you have something in the mix that is causing an issue that is outside of the norm.&lt;P&gt;Outside of looking at your code and debugging it the only thing I can tell you to do is to work backwards.&amp;nbsp; Copy your form over so you can get back to ground zero (or create a new form).&amp;nbsp; Then add one&amp;nbsp;piece at a time until you can determine where the trouble spot is.&amp;nbsp; This is going to be the only way to diagnose where your issue is.</description><pubDate>Sat, 12 Apr 2008 13:11:09 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15571.aspx</link><description>Hi Trent,&lt;P&gt;I will try all your suggestions but, all these forms and very simple lookup maintenance forms with less than 30 records each, here is the code in the form's class:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; frmProducer&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBO1_ParentFormLoading() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; ProducerBO1.ParentFormLoading&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ProducerBO1.FillAllRecords()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;End&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Here&amp;nbsp;is the code in the ProducerBO.vb:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; FillAllRecords()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FillDataTable(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"SELECT * FROM Producer"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;Overrides&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;Function&lt;/FONT&gt;&lt;FONT size=2&gt; GetCustomBindablePropertyDescriptors() &lt;/FONT&gt;&lt;FONT size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; FieldPropertyDescriptor()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' Create and return a new array of FieldPropertyDescriptor objects that contains &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' the ReflectionPropertyDescriptor for the Custom Fields.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; FieldPropertyDescriptor() _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; ReflectionPropertyDescriptor(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"ProducerFullAddress"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;GetType&lt;/FONT&gt;&lt;FONT size=2&gt;(ProducerBO))}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Function&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' This property will return the Producer Full Address&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&amp;lt;Browsable(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;), _&lt;/P&gt;&lt;P&gt;BusinessFieldDisplayInEditor(), _&lt;/P&gt;&lt;P&gt;Description(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Producer Full Address"&lt;/FONT&gt;&lt;FONT size=2&gt;), _&lt;/P&gt;&lt;P&gt;DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)&amp;gt; _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;ReadOnly&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;Property&lt;/FONT&gt;&lt;FONT size=2&gt; [ProducerFullAddress]() &lt;/FONT&gt;&lt;FONT size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.String&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' Format the Full Address string&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt;&lt;FONT size=2&gt; cFullAddress &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; StringBuilder = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; StringBuilder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.AppendLine(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ProducerName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Street)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.City)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.State)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.AppendLine(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Zip)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.AppendLine(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" Phone "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Phone &amp;amp; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;" Fax "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Fax)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cFullAddress.Append(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.EmailAddress)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return&lt;/FONT&gt;&lt;FONT size=2&gt; cFullAddress.ToString&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Property&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;P&gt;As you can see this is a very basic simple stuff, I used the same coding in all these maintenance forms and they all show the slow rendering when running from the .EXE outisde the VS IDE.&lt;P&gt;Once I made the changes you suggested and re-test, will let you know if there is any improvement.&amp;nbsp;</description><pubDate>Sat, 12 Apr 2008 11:04:52 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15561.aspx</link><description>This question is always like asking, "How long is a string?"&amp;nbsp; There are hundreds of little things that you can do to drastically improve performance.&amp;nbsp; Sometimes this requires that you get a code analyzer to see where all of your trouble spots are, but I can already tell from your video that you are fighting two things:&lt;OL&gt;&lt;LI&gt;You are putting all of your load logic in the New or Load of form without threading anything.&amp;nbsp; When you place all of your load logic in the New or Load, you are obviously going to slow instantiation.&amp;nbsp; There are many different things that you can do here.&amp;nbsp; First, you can use the SF ThreadManager control to help you in thread management if you are not adept at creating and managing threads.&amp;nbsp; You can perform the loading of the data from the server on the thread while the UI is on the main thread, thus impoving the rendering and instantiation.&amp;nbsp; You also want to optimize your queries and make as few trips to the server as possible when loading.&amp;nbsp; For example, if you are loading data into more than one business object, you can make a single trip to the server by using the FillMultipleDataTables method (version 1.6.5 or later, you can refer to the docs and samples on this new method).&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;Reduce the number of gradients and transparent requirements of the dialog.&amp;nbsp; You can have a very attractive themed interface by using a themed panel that has the RenderAsSolidBackground property set to True.&amp;nbsp; Then the ThemedGroupBoxes TransParent property to False, FillBody to False, ThemeSupport to ColorsOnly, and the HeaderStyle to WindowsStyle (or whichever style you prefer).&amp;nbsp; When you then place the labels and textboxes within the group box it will render more quickly.&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I could talk for hours on this very topic (and actually will in the July class) :)&amp;nbsp; Past this, it will be more of a consultation type of thing for me to look at your specific application and tell you how to speed things up...but there are a lot of little things that add up to a lot.&lt;/P&gt;&lt;P&gt;Recently I was talking with someone who had a process that was taking 45 minutes....after talking he got this down to less than 30 seconds.&amp;nbsp; So many times it is just a matter of taking a different approach to improve performance.&lt;/P&gt;&lt;P&gt;But as we all know, this is nothing new to WinForms development! :) Give me a Cray and I can probably find a way to slow it down :D</description><pubDate>Fri, 11 Apr 2008 19:26:14 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Winform rendering pretty slow</title><link>http://forum.strataframe.net/FindPost15560.aspx</link><description>I forgot to mention that I am loading the forms using Trent's technique in this message:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost5199.aspx"&gt;http://forum.strataframe.net/FindPost5199.aspx&lt;/A&gt;</description><pubDate>Fri, 11 Apr 2008 19:05:47 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>