469,613 Members | 1,772 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Form load - flickering

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
Nov 20 '05 #1
1 1871
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/de...us/cpref/html/
frlrfsystemwindowsformscontrolclasssetstyletopic.a sp

Hope this helps!

Matthew Stoecker
Visual Basic User Education Team

--------------------
| From: "Able" <ab**@epost.no>
| 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: <qi******************@news4.e.nsc.no>
| NNTP-Posting-Host: 80.212.114.27
| X-Complaints-To: ne********@telenor.net
| 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!TK2MSFTN GP08.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!53ab275 0!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
|
|
|

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.