Page 1 of 1

Best regards and anomalous performance

Posted: Tue Jul 24, 2007 2:16 pm
by MarcoBoschi
Hi Antonio,
You may note that this two little program are different in only one thing. The second one make use of WINDOW instead of DIALOG
======slow.prg=========
#include "fivewin.ch"

FUNCTION MAIN()

LOCAL oDlg
LOCAL oBrw
LOCAL lPaint := .F.

SELECT 0
USE customer


DEFINE DIALOG oDlg FROM 10 , 10 TO 600 , 800 PIXEL

@ 0, 0 LISTBOX oBrw FIELDS SIZE 600 , 800

ACTIVATE DIALOG oDlg

RETURN NIL

=====fast.prg====================
#include "fivewin.ch"

FUNCTION MAIN()

LOCAL oWnd
LOCAL oBrw
LOCAL lPaint := .F.

SELECT 0
USE customer


DEFINE WINDOW oDlg FROM 10 , 10 TO 600 , 800 PIXEL

@ 0, 0 LISTBOX oBrw FIELDS SIZE 600 , 800

ACTIVATE DIALOG Wnd

RETURN NIL

If I put in background listbox of slow.exe program and I catch a dialog of another program such as cmd in window mode or any other program and I move quickly (like a shaker) this dialog over listbox of slow.exe program cells listbox repaint is too slow, I note something like a slime.
On the contrary fast.exe works fine like all other windows program I tested: Excel, Groupwise, Outlook and other software compiled in Visual Objects or Fox Pro.
In my opinion it is very probably that thar is a bug somewhere.
Have a good day
Marco

Posted: Tue Jul 24, 2007 2:43 pm
by Antonio Linares
Marco,

The speed delay probably is caused for the "double buffer" technique used on dialogs. The "double buffer" technique avoids "flickering" but the painting speed is slower

You can disable the "double buffer" technique in FWH modifying these two methods in Class TWindow:

METHOD DispBegin() VIRTUAL
METHOD DispEnd() VIRTUAL

Posted: Tue Jul 24, 2007 3:06 pm
by MarcoBoschi
Ok thanks :)