Page 1 of 1

FWH Gradiens .. seem slower FWH 2310 - RAO

PostPosted: Sat Feb 24, 2024 4:02 pm
by Rick Lipkin
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: Select all  Expand view

//--------------------
Func DarkGreyGrad()

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

Return(nil)
 


Code: Select all  Expand view

//-------------------------------
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: Select all  Expand view

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

Re: FWH Gradiens .. seem slower FWH 2310 - RAO

PostPosted: Sat Feb 24, 2024 6:00 pm
by Antonio Linares
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: Select all  Expand view
function DarkGreyGrad()

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

return nil

Re: FWH Gradiens .. seem slower FWH 2310 - RAO

PostPosted: Sat Feb 24, 2024 6:34 pm
by Rick Lipkin
Antonio

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

Rick Lipkin