I have an ABL .net form that loads a couple of ABL user controls. The user controls take a bit of time to gather their data and when the form loads I see this happening and it's fairly distracting. I would prefer it if the form was not visible until everything is fully loaded.
This issue is likely exacerbated by running under Citrix where screen writes are often slower.
Is there a remedy for this? I'd like to not show the window until everything is fully loaded.
Thanks
We've implemented LockWindowUpdate in our customer application. For better performance and a snappier feel.
Yes we use GUI for .NET.
We use a super procedure in our application with:
PROCEDURE LockWindowUpdate EXTERNAL "user32":
DEFINE INPUT PARAMETER hWndLock AS LONG.
/* DEFINE RETURN PARAMETER bReturn AS SHORT. */
END PROCEDURE.
Run this with input either 0 or <form>:Handle:ToInt32()
Richard
Tom,
Did the LockWindowUpdate work for you?
Thanks Tom.
Something else very easy... it doesn't improve performance, but it makes a program with UI lag feel faster: Set the form Opacity to zero in the visual designer, then later in the Shown event, set Opacity back to 100.
Since we're talking about .NET forms, also look at SuspendLayout & ResumeLayout methods.
( msdn.microsoft.com/.../system.windows.forms.control.suspendlayout(v=vs.110).aspx )
We use SuspendLayout & ResumeLayout quite extensively. However, a MS tablelayoutpanel does not have those methods. Using those methods on a form with a tablelayoutpanel seems to have no effect.
Thanks.
This seems like a nice trick. We will give that a try.
Thanks,