FWH Gradiens .. seem slower FWH 2310 - RAO

FWH Gradiens .. seem slower FWH 2310 - RAO

Postby Rick Lipkin » Sat Feb 24, 2024 4: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: Select all  Expand view  RUN

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

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

Return(nil)
 


Code: Select all  Expand view  RUN

//-------------------------------
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  RUN

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
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

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

Postby Antonio Linares » Sat Feb 24, 2024 6: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: Select all  Expand view  RUN
function DarkGreyGrad()

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

return nil
regards, saludos

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

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

Postby Rick Lipkin » Sat Feb 24, 2024 6:34 pm

Antonio

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

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests