Performance problems while using double-buffering

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

ps_dk
User
Posts: 2
Joined: Tue Nov 09, 2010 9:29 am

Performance problems while using double-buffering

Post by ps_dk »

Hello,

we use the WS_EX_COMPOSITED window style on the forms to avoid flickering problems (it enables double-buffering).

The PDF Viewer which is embedded in one of our forms works very slowly when we enable
this window style. When we disable it, the performance is well.

Does anybody know a solution for this problem or perhaps an error source for this
behaviour?

Thank you very much.

Kind regards.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Performance problems while using double-buffering

Post by Stefan - PDF-XChange »

Hello ps_dk,

One of our dev guys tried to reproduce your problem but was unable to do so.
So please send us a sample project - either upload it here or send it to support@pdf-xchange.com .
(make sure to remove your DEV codes from the source or we will need to deactivate them if you post your project here with them)

Best,
Stefan
ps_dk
User
Posts: 2
Joined: Tue Nov 09, 2010 9:29 am

Re: Performance problems while using double-buffering

Post by ps_dk »

Hi Stefan,

thanks for your answer.
We could reproduce the problem with your "Full Demo" Solution.
Just paste the following code to the Form1 class of your "Full Demo" Solution:

Code: Select all

    Protected Const WS_EX_COMPOSITED As Int32 = &H2000000

    Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
        Get
            ' WS_EX_COMPOSITED Flag
            ' -> http://msdn.microsoft.com/en-us/library/ff700543%28v=VS.85%29.aspx
            Dim cp = MyBase.CreateParams
            cp.ExStyle = cp.ExStyle Or WS_EX_COMPOSITED
            Return cp
        End Get
    End Property
Especially the scrolling seems to be very slow.

Dennis
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Performance problems while using double-buffering

Post by Corwin - Tracker Sup »

Hi Dennis,

In DotNet environment you should use DoubleBuffered property
http://msdn.microsoft.com/en-us/library ... fered.aspx
HTH.