StrataFrame Forum

Form painting slowly

http://forum.strataframe.net/Topic26515.aspx

By Luiz Lima - 3/16/2010

Hi,

I have the same problem described on this topic below, but I made the changes and the problem persist..
Somebody help me?

http://forum.strataframe.net/Topic14246-7-1.aspx?Highlight=screen+slow

Tks

By Ivan George Borges - 3/16/2010

Hi Luiz.

Another post for you to get some ideas:

http://forum.strataframe.net/FindPost15556.aspx

Abraços.

By Trent L. Taylor - 3/17/2010

Luiz,



This is a really ambiguous question that I cannot give you a "magic" answer on. We have an extremely massive medical application and it is snappy and paints great. But the issue with WinForms is that each control has its own handle and renders itself, also if you are using a lot of automatic population within the same dialog and making a lot of trips back to the server, this too can slow down instantiation. So my point it, you need to isolate where your performance issue lies. If you remove any pre-loading or data population logic, does it speed up? If so, then you need to create a sproc to make one trip instead of a lot of trips. Do you have custom controls running on the screen? How many controls do you have packed into a single page or panel at any one time? These are all questions that you should ask yourself when working through a problem like this.



We have one dialog with close to a thousand controls once all of the pages are loaded. But instead of putting them all in a single class, we created a user control for each page then programmatically added the page as needed versus just being on the dialog all the time since it may not always be used. We also use child dialogs when necessary, etc. So like I said, there is not nearly enough information for us to work off of here and this is highly influenced by your screen design. Hope some of these ideas help.
By Luiz Lima - 3/18/2010

Trent,

Our application normally does not load a lot of database content in the form load.
I'm analyzing the problem with render... one thing important would be load the controls in each class.... I´m studying right now....
A good thing is about my app working faster than Edhy, and I use DevExpress ribbon.  Cool

Let me try do more thing before tell you ok?

tks a lot again

By Edhy Rijo - 3/18/2010

Luiz Lima (03/18/2010)
A good thing is about my app working faster than Edhy, and I use DevExpress ribbon. Cool




Hi Luiz,



What specifically in your application is working faster than mine? Can you share what have you done to get it to run faster?



I am always ready to optimize my applications and willing to learn any tricks to accomplish that. Hehe
By Luiz Lima - 3/18/2010

Hi Big Ed,

The only thing different than yours is that my app does not fill BOs in Load Event.
I´m testing this commands:

Protected Overrides Sub OnHandleCreated(ByVal e As System.EventArgs)

MyBase.OnHandleCreated(e)

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

End Sub

Protected Overrides Sub OnShown(ByVal e As System.EventArgs)

MyBase.OnShown(e)

MicroFour.StrataFrame.Tools.LockScreen.Unlock()

End Sub

It works, reduced the time (Tks Trent!!!).. but close button from DevExpress MDI disappear....

Do you have an idea about this?

I will work on Transparent stuffs that Trent said.

Tks

By Edhy Rijo - 3/18/2010

Hi Luiz,



Thanks for the code, in fact I was not using those and after adding it to my base form class it does speed up things a bit.



Still it does not make sense in .Net to have all these nice themed controls and not been able to get it to display normally without a lot of tweaks. BigGrin I hope .Net 4 and VS2010 improve this process.



I attached a screen shot of one of my forms which have the following controls:

A PanelManager with 2 pages

A ThemedSplitContainer to host the Card List

Another ThemedSplitContainer to handle the Top and Bottom section.

A TableLayoutPanel at the bottom right

2 ThemedStatusStrip and 2 ListViews

Several labels and textboxes and in the Page2 of PanelManager (not shown) several ThemedGropuBoxes

Loading the data is very fast, it is just when opening the form the first time that it takes a noticeable time to show the first page.



About your Close button disappearance, since I am not using DevExpress I have not idea what my be happening. Cool All my forms are based on the SF StandardForm using the logic in StrataFlix.
By Luiz Lima - 3/19/2010

Ed,

You are right! The time reduced was so small.... Sad
I´d like to improve more performance... what do you think? Do you have an ideia?

Tks

Luiz

By Edhy Rijo - 3/19/2010

Luiz Lima (03/19/2010)
I´d like to improve more performance... what do you think? Do you have an ideia?




Sorry, but I am pretty new to .NET and I have already done everything Trent has suggested here. Like I said, I hope that .Net 4 will have some improvement on this regard.