Form load - flickering

  • Thread starter Thread starter Able
  • Start date Start date
A

Able

Dear friends

My app load the startup form and all of its controls step by step and its
indeed not nice. Do somebody know how to hide the form until the painting is
finished?

Regards Able
 
You might want to try enabling double buffering. This causes the control to
be drawn first to a memory buffer, then rapidly copied to video memory when
finished, and it can dramatically reduce flicker. The following code
snippet demonstrates how to switch double buffering on.

Public Sub EnableDoubleBuffering()
' Set the value of the double-buffering style bits to true.
Me.SetStyle(ControlStyles.DoubleBuffer _
Or ControlStyles.UserPaint _
Or ControlStyles.AllPaintingInWmPaint, _
True)
Me.UpdateStyles()
End Sub

For more information, see the following topic on MSDN

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformscontrolclasssetstyletopic.asp

Hope this helps!

Matthew Stoecker
Visual Basic User Education Team

--------------------
| From: "Able" <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| Subject: Form load - flickering
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 80.212.114.27
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Thu, 08 Jan 2004 00:07:02 MET
| X-Trace: news4.ulv.nextra.no 1073516822 80.212.114.27
| Date: Thu, 8 Jan 2004 00:07:00 +0100
| X-Received-Date: Thu, 08 Jan 2004 00:06:49 MET (news01.chello.no)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!newsfeed.freenet.de!fr.ip.ndsoftware.net!proxad.ne
t!195.70.164.134.MISMATCH!news.tdcnorge.no!news01.chello.no!newsfeed1.e.nsc.
no!nsc.no!nextra.com!news4.e.nsc.no.POSTED!53ab2750!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.vb:170857
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Dear friends
|
| My app load the startup form and all of its controls step by step and its
| indeed not nice. Do somebody know how to hide the form until the painting
is
| finished?
|
| Regards Able
|
|
|
 
Back
Top