472,955 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,955 software developers and data experts.

RE: Form rendering issue

"Ron" wrote:

I have several windows forms in my project all which derive from a custom
form template. There is a lot of processing that goes on in the constructor
but I have kept the form_load event handler method free of any code.

My problem is that when I load the form it appears to draw incrementally
instead of just "snapping" up. I ideally would like to do all the rendering
of the form while it is hidden showing itself when the form has completely
finished rendering itself.

I have tried all sorts of trickery but I cant seem to prevent the form from
drawing itself before the users eyes which gives the application a sluggish
look, when it really isnt.

Thanks for any tips you might be able to offer.

Hi Ron,

I'm afraid you won't get the snappy user interface you may get with native
code. Event though you do all your creation in the constructor. A lot of
code won't actually run until the controls are actually created (assigned
with window handle etc). You are better off putting the loading code in the
load event rather than the constructor because of this.

There are things you can do to improve user experience. Especially for the
application startup. Use a splash screen if the loading takes a long time.
Hide complex usercontrols with a panel until everything is loaded. Use
DoubleBuffered. Cache data needed by the controls. Use asyncronous loading
of data.

Happy Coding!
Morten Wennevik [C# MVP]

Sep 12 '08 #1
0 1173

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Jim | last post by:
Hi, I keep getting form results emailed to me that would indicate a form from my web site is getting submitted with all fields blank or empty, but my code should preventing users from proceeding...
by: Mark Hannon | last post by:
I am trying to wrap my brain around storing form elements inside variables & arrays before I move on to a more complicated project. I created this simple example to experiment and as far as I can...
by: Vaclav Jedlicka | last post by:
Hi all The code generated by the server side control asp:form generates invalid code. The HTML tag FORM always contains attribute "name". When I validate the page with the online validator...
by: Nacho Nachev | last post by:
Hello, AFIAK ASP.NET (1.1) uses a technology called 'Adpative Rendering' to output HTML that is compliant with the client browser or at least stick to HTML 4 specification or IE. This seems...
by: Jim Little | last post by:
Hello, I'm driving myself crazy either because I'm missing something about ASP.NET, or what I'm trying to do simply can't be done. First, I am not using session variables to track state. My...
by: Daniel | last post by:
Hey guys I have an app running a directx window, that part is fine but as you know it runs on an infinite loop redering frames per second. My issue is this is for a gaming app i am making that...
by: Spotnick | last post by:
I have no idea why, but since I'm trying to recreate my website using ASP.NET 2.0 I've encountered so many performance issues that I'm about to give up and continue using v1.1 Seriously, how can...
by: Coward 9 | last post by:
HI, I saw in an example hello.aspx, there is a <form tagbeing used like <form runat="server> I search all html tag references and could NOT find "runat" attributes for <formtag. which...
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.