FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH Gradiens .. seem slower FWH 2310 - RAO
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
FWH Gradiens .. seem slower FWH 2310 - RAO
Posted: Sat Feb 24, 2024 04:02 PM
Rao

As you know I use Functions to paint my screen Gradients .. for some reason the DarkGreyGrad() functions paints much slower than the LightGreyGrad) FUnction ... especially with FWH2310 ... older versions of FWH are not effected ...
Code (fw): Select all Collapse
//--------------------
Func DarkGreyGrad()

SetDlgGradient({{ 005.9000, 14671839, 4144959  },{ 0.1, 4144959, 14671839  }})          

Return(nil)
Code (fw): Select all Collapse
//-------------------------------
Func LightGreyGrad()

SetDlgGradient( { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } } )

Return(nil)
As in this code especially .. If I remed out the DarkGreyGrad() function and replaced it with the LightGteyGrad() function .. the LightGreyGrad() function paints the Dialogs much faster

Code (fw): Select all Collapse
cSql := "SELECT * from REQUEST order by [LEAVE] DESC"     // leave date

oRsTrav := TOleAuto():New( "ADODB.Recordset" )
oRsTrav:CursorType     := 1        // opendkeyset
oRsTrav:CursorLocation := 3        // local cache
oRsTrav:LockType       := 3        // lockoportunistic

TRY
   oRsTrav:Open( cSQL,xCONNECT )
CATCH oErr
   oRsMan:CLose()
   MsgInfo( "Error in Opening TRAVFORM table" )
   RETURN(.F.)
END TRY

oRsTrav:Filter := "[Employee] = 'bogus'"


DarkGreyGrad()
*LightGreyGrad()      // <---  LightGreyGrad is much faster painting the dialog boxes ..
Can you look at the differences in the code between the Light and Dark functions and make some recommendations to speed up my ( darkgreyGrad() ) gradient function ??

Thanks
Rick Lipkin
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH Gradiens .. seem slower FWH 2310 - RAO
Posted: Sat Feb 24, 2024 06:00 PM
Dear Rick,

In function LightGreyGrad() an array with just one element (one subarray) is used

In function DarkGreyGrad() an array with two elements (two subarrays) is used

so function DarkGreyGrad() is doing more work than function LightGreyGrad()

Try with this code:
Code (fw): Select all Collapse
function DarkGreyGrad()

   SetDlgGradient( { { 005.9000, 14671839, 4144959 } } )          

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: FWH Gradiens .. seem slower FWH 2310 - RAO
Posted: Sat Feb 24, 2024 06:34 PM

Antonio

Thank you .. been a while since I have looked at those functions .. Your suggestion works!

Rick Lipkin

Continue the discussion