Best regards and anomalous performance

Best regards and anomalous performance

Postby MarcoBoschi » Tue Jul 24, 2007 2:16 pm

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
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Postby Antonio Linares » Tue Jul 24, 2007 2:43 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby MarcoBoschi » Tue Jul 24, 2007 3:06 pm

Ok thanks :)
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 62 guests