How to show a form only after fully drawn?

machinogodzilla

Active member
Joined
Mar 3, 2007
Messages
25
Programming Experience
Beginner
Hi!


I ve got one form with several controls on it. When I start up the program
you can see everything being drawn live. I have notice that this is all
due to using a background image on the form. But I would like to keep it
anyway.

How to make the program draw that form in the background and show it
after everything is ready?


The other thing is that I am very surprised that that image slows down
everything so much. I ve got an image viewer which shows a loading
time of an image and in case of this picture it takes it 0.0 seconds to
load it. So what is the problem of VB.net?


Regards,
machinogodzilla
 
Last edited:
Hi!


Just to add that I don't expect anyone to write a complete solution for me.
If anyone could just point me the direction I should go I would appreciate it
as this is all new stuff for me.

Thanks!


Regards,
machinogodzilla
 
Large background images is usually painful for forms/controls, you can create/draw/assign that image in form Load event that happen before the form is shown. What you must understand is that controls are redrawn very frequently, as you've seen this happens first when form is shown, nothing is drawn on screen until it is actually visible, then again and again for every move/resize of form and every time something is moved over the form, and usually also in other cases when OS needs to refresh itself. I addition the application itself also often forces full/local paint refreshes, so a lot is going on. You can in some cases help the form by setting some ControlStyles for local and faster drawing.
 
Back
Top