Animation

Animation

Postby byte-one » Mon Nov 28, 2016 9:56 am

I will show a circle in 5 steps growing the Diameter. The time from step to step should be 0.1 secs. The problem with waitseconds() etc. is the stop from all activity for this time.
Is there a way without stopping the program?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Animation

Postby Antonio Linares » Mon Nov 28, 2016 10:19 am

Günther,

Try to modify function WaitSeconds() this way:

Code: Select all  Expand view
function WaitSeconds( nSecs )

   local nStart := GetTickCount()

   DEFAULT nSecs := 1

   while GetTickCount() - nStart < ( 1000 * nSecs )
      SysRefresh()
   end

return nil
regards, saludos

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

Re: Animation

Postby byte-one » Mon Nov 28, 2016 2:59 pm

Thank you, Antonio! Works good.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Animation

Postby nageswaragunupudi » Tue Nov 29, 2016 12:56 am

Doesn't SysWait( n ) work without any change?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests