could distinguish between actions desired by user and actions performed by the system
In the second one (system, background and involuntary) for instance evoked only to move another application over it on the desktop, it would be much faster, if repaint was just "the image" of that moment, or as written above, reading an array.
#include 'fivewin.ch'
#include 'xbrowse.ch'
#xtranslate DelObj <o> => If <o> != nil; DeleteObject( <o> ); endif; <o> := nil
CLASS TXBR3 FROM TXBROWSE
CLASSDATA lRegistered AS LOGICAL // used internally
DATA hSaveScr
METHOD Paint()
METHOD Destroy()
ENDCLASS
METHOD Paint() CLASS TXBR3
local aInfo
if ::hSaveScr != nil .and. GetFocus() != ::hWnd
aInfo := ::DispBegin()
DrawBitmap( ::hDC, ::hSaveScr, 0, 0 )
::DispEnd( aInfo )
else
Super:Paint()
DelObj ::hSaveScr
::hSaveScr := WndBitMap( ::hWnd )
endif
return nil
METHOD Destroy() CLASS TXBR3
DelObj ::hSaveScr
return Super:Destroy()
// Test disabled TWBrowse for painting while disabled.
// Use with FWH\samples\customer.dbf file
#include "fivewin.ch"
function main()
local oWnd, oLbx, oBar
use customer
define window oWnd title "Test Browse"
define buttonbar oBar of oWnd
define button of oBar action oLbx:disable()
@0,0 listbox oLbx fields first, last;
alias "customer";
of oWnd
oLbx:bSkip:= {|nRecs| (msgbeep(),customer->(dbskipper( nRecs)) ) }
oWnd:oClient:= oLbx
activate window oWnd
return nil
function main()
local oWnd, oLbx, oBar
use customer
define window oWnd title "Test Browse"
define buttonbar oBar of oWnd
define button of oBar action oLbx:disable()
define button of oBar action oLbx:enable()
@0,0 listbox oLbx fields first, last;
alias "customer";
of oWnd
oLbx:bSkip:= {|nRecs| (msgBeep(),sleep(.1),sysrefresh(),customer->(dbskipper( nRecs)) ) }
oWnd:oClient:= oLbx
activate window oWnd
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 72 guests